package org.example.develop;

import org.apache.log4j.Level;
import org.apache.log4j.Logger;
import org.apache.spark.SparkConf;
import org.apache.spark.api.java.JavaRDD;
import org.apache.spark.api.java.JavaSparkContext;
import org.apache.spark.api.java.function.FilterFunction;
import org.apache.spark.sql.*;
import org.apache.spark.sql.api.java.UDF1;
import org.apache.spark.sql.api.java.UDF2;
import org.apache.spark.sql.expressions.UserDefinedFunction;
import org.apache.spark.sql.expressions.Window;
import org.apache.spark.sql.expressions.WindowSpec;
import org.apache.spark.sql.types.DataTypes;
import org.example.utils.MysqlUtils_2;

import java.io.IOException;
import java.sql.Timestamp;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.stream.Collectors;

import static org.apache.spark.sql.functions.*;

/**
 * 创建一个类,主要用来处理tcms的故障数据,根据故障数据做视情为维修和健康评估. 当前类中主要处理的是:模型 1-30
 */
public class JsonProcessor {
    // 尝试搭配log4j来调试代码,让当前代码的执行结果追加到文本中,后续出现问题方便调试.
    private static final Logger logger = Logger.getLogger(JsonProcessor.class);

    public static void main(String[] args) throws AnalysisException, IOException, ParseException {
        // 引入log4j,消除控制台的警告
        Logger.getLogger("org").setLevel(Level.WARN);
        Logger.getLogger("akka").setLevel(Level.WARN);
        SparkConf conf = new SparkConf().setAppName("PantographModelFunction") // 设置应用程序名称
                .setMaster("local[*]") // 设置运行模式，这里是本地模式
                .set("spark.executor.memory", "6g") // 设置executor内存大小
                .set("spark.serializer", "org.apache.spark.serializer.KryoSerializer") // 设置序列化器
                .set("spark.driver.allowMultipleContexts", "true") // 允许多个SparkContext同时存在
                .set("spark.hadoop.validateOutputSpecs", "false") // 禁止输出路径已经存在时抛出异常
                .set("hive.mapred.supports.subdirectories", "true") // 开启Hive支持
                .set("mapreduce.input.fileinputformat.input.dir.recursive", "true") // 开启递归读取文件夹中的文件
                .set("spark.debug.maxToStringFields", "100").set("spark.sql.codegen.wholeStage", "false")
                .set("spark.sql.caseSensitive", "false"); // Spark会自动处理大小写不匹配的情况;
        // 创建SparkContext
        JavaSparkContext sc = new JavaSparkContext(conf);
        SparkSession spark = SparkSession.builder().config(conf).getOrCreate();
        List<String> jsonData = Arrays.asList("[" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011100\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1充电接触器一卡合故障\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"100011101\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:16\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1充电接触器二卡合故障\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011102\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:17\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1充电接触器三卡合故障\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011103\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:18\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2短接接触器一卡合故障\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000011104\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:20\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2短接接触器二卡合故障\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1100011105\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:21\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2短接接触器三卡合故障\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011106\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:21\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1短接接触器三卡合故障\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011107\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:21\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1短接接触器一卡合故障\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011108\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:21\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1短接接触器二卡合故障\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011109\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:21\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2短接接触器一卡合故障\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011110\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:21\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2充电接触器二卡合故障\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000102222\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:21\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2充电接触器三卡合故障\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1002\",\"idx\": \"2000100011119999\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:22\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2充电接触器二卡分故障\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1002\",\"idx\": \"2000100011102\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:16\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2短接接触器三卡分故障\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1003\",\"idx\": \"3000100011101\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:20\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"变流器元件故障报警\",\"phm_mc\": \"变流器1ACC元件总故障\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1003\",\"idx\": \"3000100011102\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:25\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"变流器元件故障报警\",\"phm_mc\": \"变流器1ACC的U相下管故障\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1003\",\"idx\": \"3000100011103\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:28\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"变流器元件故障报警\",\"phm_mc\": \"变流器1ACC的V相上管故障\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1003\",\"idx\": \"3000100011104\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:22\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"变流器元件故障报警\",\"phm_mc\": \"变流器1ACC的U相上管故障\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1003\",\"idx\": \"3000100011105\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:21\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"变流器元件故障报警\",\"phm_mc\": \"变流器1ACC的W相上管故障\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1003\",\"idx\": \"3000100011106\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:19\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"变流器元件故障报警\",\"phm_mc\": \"变流器1M3斩波管故障\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1003\",\"idx\": \"3000100011106\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:19\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"变流器元件故障报警\",\"phm_mc\": \"变流器2M2斩波管故障\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1004\",\"idx\": \"3000100011107\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:19\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"TCU通讯故障\",\"phm_mc\": \"TCU1_MCC1通讯中断\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1004\",\"idx\": \"3000100011108\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:19\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"TCU通讯故障\",\"phm_mc\": \"TCU1_MCC2通讯中断\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1004\",\"idx\": \"3000100011109\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:19\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"TCU通讯故障\",\"phm_mc\": \"TCU1_MCC3通讯中断\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1066\",\"idx\": \"30001000111020\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-18 10:00:19\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"模块过热\",\"phm_mc\": \"变流器1第三重模块过热\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1066\",\"idx\": \"30001000111021\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-18 10:00:20\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"模块过热\",\"phm_mc\": \"变流器1第二重模块过热\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1066\",\"idx\": \"30001000111022\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:21\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"模块过热\",\"phm_mc\": \"变流器1第一重模块过热\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1066\",\"idx\": \"30001000111023\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:25\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"模块过热\",\"phm_mc\": \"辅逆1模块过热\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1077\",\"idx\": \"30001000111024\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:19\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"模块过热\",\"phm_mc\": \"变流器2第一重模块过热\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1077\",\"idx\": \"30001000111025\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:39\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"模块过热\",\"phm_mc\": \"辅逆2模块过热\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1005\",\"idx\": \"30001000111010\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:19\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"TCU通讯故障\",\"phm_mc\": \"TCU2_MCC1通讯中断\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1005\",\"idx\": \"30001000111011\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:19\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"TCU通讯故障\",\"phm_mc\": \"TCU2_MCC1通讯中断\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1005\",\"idx\": \"30001000111012\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:19\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"TCU通讯故障\",\"phm_mc\": \"TCU2_MCC2通讯中断\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1005\",\"idx\": \"30001000111013\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:19\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"TCU通讯故障\",\"phm_mc\": \"TCU2_MCC3通讯中断\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1005\",\"idx\": \"30001000111014\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:19\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"TCU通讯故障\",\"phm_mc\": \"TCU2_LCC通讯中断\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"},\n" +
                        // 模型11.....
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011111\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1辅逆输出过流\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011112\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2辅逆输出过流\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011113\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2辅逆输出过流\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        // 模型12.....
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011114\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1辅逆接地故障\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011104\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2辅逆接地故障\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        // 模型13.....
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011115\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1检测原边过流(峰值）\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011116\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1检测原边过流(有效值)\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011117\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2检测原边过流(峰值）\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011101\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2检测原边过流(峰值）\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1011103\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2检测原边过流(有效值)\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        // 模型14.....
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011118\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1检测原边接地\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011119\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1检测原边接地\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011120\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2检测原边接地\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        // 模型15.....
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011121\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2中间电压1直流过压\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011122\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2中间电压2直流过压\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011123\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2中间电压3直流过压\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"10011102\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1中间电压3直流过压\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011105\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2中间电压3直流过压\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        // 模型16.....
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011124\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2L1输入过流\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011125\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2L1输入过流\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011126\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2L2输入过流\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011127\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2L3输入过流\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011128\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2L2输入过流\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011129\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1L1输入过流\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011130\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1L2输入过流\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011131\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1L2输入过流\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                // 模型17.....
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011132\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1 1轴主回路接地\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011133\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1 2轴主回路接地\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011134\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1 3轴主回路接地\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011135\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1 1轴主回路接地\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011136\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2 4轴主回路接地\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011137\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2 5轴主回路接地\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011138\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2 5轴主回路接地\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011139\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2 6轴主回路接地\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                // 模型18.....
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011140\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1 1轴充电超时\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011141\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1 2轴充电超时\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011142\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1 3轴充电超时\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011143\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1 3轴充电超时\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011144\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2 4轴充电超时\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011145\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2 5轴充电超时\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011146\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2 6轴充电超时\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011147\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2 6轴充电超时\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                // 模型19.....
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011148\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1 1轴逆变过流\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011149\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1 2轴逆变过流\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011150\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1 3轴逆变过流\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011151\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1 2轴逆变过流\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011152\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2 4轴逆变过流\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011153\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2 5轴逆变过流\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
//                //"{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011154\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2 6轴逆变过流\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\"},\n" +
//                //"{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011155\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2 6轴逆变过流\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\"},\n" +
                        // 模型20.....
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011156\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1斩波一过流\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011157\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1斩波二过流\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011158\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1斩波二过流\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011159\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器1斩波三过流\",\"phm_bjwz\": \"1\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011160\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2斩波一过流\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011161\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2斩波二过流\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1001\",\"idx\": \"1000100011162\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:14\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"phm类别\",\"phm_mc\": \"变流器2斩波二过流\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-02-02 12:00:12\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"运用种类\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"故障码\",\"GZLY\":\"故障来源\",\"ZDLB\":\"诊断类别\",\"YFYY\":\"引发原因\"},\n" +
                        "{\"s_train_id\": \"HXD1D-1005\",\"idx\": \"10001000111013\",\"cx\": \"HXD1D\",\"source\": \"tcms\",\"gzkssj_up\": \"2023-03-17 10:00:18\",\"ssxt\": \"牵引系统\",\"xtbm\": \"系统编码\",\"xtpjm\": \"故障系统码2（PJ码）\",\"ssbj\": \"牵引变流器\",\"bjbm\": \"部件编码\",\"bjpjm\": \"PJ00003\",\"gzdm_wm\": \"故障代码\",\"gzmc\": \"故障名称\",\"phm_lb\": \"变流器元件故障报警\",\"phm_mc\": \"变流器2M2斩波管故障\",\"phm_bjwz\": \"2\",\"zj_ms\": \"珠玑-描述\",\"zj_fa\": \"珠玑-失修方法\",\"pjxlh\": \"配件序列号\",\"pjdjm\": \"配件单件码\",\"lj\": \"路局\",\"ljjc\": \"路局简称\",\"lj_id\": \"路局码\",\"psd\": \"配属段\",\"psdjc\": \"配属段简称\",\"psd_id\": \"配属段代码\",\"cksj\": \"2023-03-20 12:10:35\",\"JCDLLXMC\":\"动力类型\",\"RC\":\"修程\",\"YYZL\":\"-\",\"ZZC\":\"生产厂家\",\"ZZRQ\":\"制造日期\",\"LJZXGL\":\"累计走行\",\"GZM\":\"-\",\"GZLY\":\"TCMS\",\"ZDLB\":\"-\",\"YFYY\":\"-\"}\n" +
                        "]"
        );


        //11~20健康评估UDF函数
        spark.udf().register("HealthAssessmentModelUDF", new HealthAssessmentModelUDF(), DataTypes.StringType);
        //tiancy: `t_phm_sqwx` 表中 MXMC、MXMS 字段通过逗号分隔,分隔后的子串进行去重操作.
        spark.udf().register("distinctString", new UDF1<String, String>() {
            public String call(String input) {
                return StringUtilsUDF.distinctString(input);
            }
        }, DataTypes.StringType);
        // 将json字符串转换成JavaRDD对象
        JavaRDD<String> jsonRDD = sc.parallelize(jsonData);
        // 最终返回健康评估结果
        unionHealthAssessment(spark, jsonRDD);
        spark.stop();
    }


    /***
     *  定义一个方法,调用此方法,会返回健康评估的结果,返回值是一个DataSet.
     * @param spark
     * @param jsonRDD 传入当前批次的tcms的实时数据
     * @return 健康评估最终结果
     * @throws AnalysisException
     * @throws IOException
     * @throws ParseException
     */
    public static Dataset<Row> unionHealthAssessment(SparkSession spark, JavaRDD<String> jsonRDD) throws AnalysisException, IOException, ParseException {
        // 处理陈浩传过来的tcms实时数据,拉去到后续作业中需要的字段. 这里是将 tcms 实时数据 left join 模型详情表,拉去到的宽表.后续所有的操作都是在这个数据集中进行后续操作.
        Dataset<TcmsRealDataJoinMxxq> tcmsJoinMxxqDs = jsonRddToDataset(spark, jsonRDD);
        // 拉取到 `t_phm_sqwx` 视情维修表中的当前躺中的历史数据.
        //Dataset<Row> tPhmSqwxLocalHistory = MysqlUtils_2.readMysqlTableDs(spark, "t_phm_sqwx").filter(expr(" hkzt = '0' and bjdjm = 'PJ00003' and cx = 'HXD1D' "));
        Dataset<Row> tPhmSqwxLocalHistory = MysqlUtils_2.readMysqlTableDs(spark, "t_phm_sqwx")
                .filter(col("hkzt").equalTo("0").and(col("bjpjm").equalTo("PJ00003")).and(col("cx").equalTo("HXD1D")));
        // 拉取到 `ads_phm_fault` 表中的当前躺的历史数据,用于后续的 健康评估.
        Dataset<Row> adsPhmFaultLocalHistory = MysqlUtils_2.readMysqlTableDs(spark, "ads_phm_fault").filter(expr("S_HKZT = '0' and S_FAULT_BW_CODE2 = 'PJ00003' and s_train_type_code = 'HXD1D'"));
        List<DatasetContainer> list = new ArrayList<>();
        list.add(processFaultType1(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType2(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType3(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType4(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType5(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType6(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType7(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType8(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType9(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType10(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType11(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType12(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType13(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType14(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType15(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType16(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType17(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType18(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType19(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType20(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType21(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType22(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType23(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType24(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType25(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType26(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType27(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType28(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType29(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));
        list.add(processFaultType30(spark, tcmsJoinMxxqDs, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory));

        DatasetContainer datasetContainer = DatasetContainer.unionDatasets2(list);
        if (datasetContainer.getDataset1() != null) {
            MysqlUtils_2.writeDataToMysqlTable(datasetContainer.getDataset1(), "ads_phm_fault", SaveMode.Append);
        }
        if (datasetContainer.getDataset2() != null) {
            // 2023-04-18 ZDLB - 诊断类别 这个字段的值写死: 模型诊断信息
            // 现在需要一个字段用来记录当前故障第一次报警的时间,这里将 fssj 这个字段用来表达当前模型的第一次报出的时间,如果当前字段的值为默认值,则插入一个最新的时间,如果有值,则不变.
            Dataset<Row> rowDataset = datasetContainer.getDataset2().withColumn("zdlb", lit("模型诊断信息"));
            Dataset<Row> adsPhmFaultDataset = MysqlUtils_2.readMysqlTableDs(spark, "ads_phm_fault");
            if (adsPhmFaultDataset != null) {
                // 读取`ads_phm_fault` 这个表中 `MX_ID`的最小 `S_FAULT_TIME`, 再和上述的 rowDataset 进行关联,将当前最小时间写入到 `t_phm_sqwx`表中
                Dataset<Row> rowDataset1 = adsPhmFaultDataset
                        .select(col("mx_id"), col("s_fault_time"))
                        .groupBy(col("mx_id"))
                        .agg(min(col("s_fault_time")).alias("fssj"))
                        .alias("t1")
                        .join(rowDataset.alias("t2"), expr("t1.mx_id = t2.id"), "inner")
                        .select("t2.*", "t1.fssj")
                        // 2023-04-20 线上跑的程序查看结果后,发现`t_phm_sqwx` 这个表中的的真实环境下还需要字段:ch,这里表中添加字段以及插入字段的值:插入的值是id通过split分隔后取1位置的值.
                        .withColumn("ch", split(col("id"), "-").getItem(1));
                logger.warn("t_phm_sqwx 表中的数据:\n" + rowDataset1.showString(500, 500, false));
                MysqlUtils_2.upsertDatasetToMySQL(rowDataset1, "t_phm_sqwx");
            }
        }
        logger.warn("ads_phm_fault 表中的数据:\n" + datasetContainer.getDataset1().showString(500, 500, false));
        logger.warn("最终返回的健康评估中的数据:\n" + datasetContainer.getDataset3().showString(500, 500, false));
        return datasetContainer.getDataset3();
    }


    /***
     * 处理HXD1D 模型一:牵引变流器接触器卡合故障视情维修模型的事情维修和健康评估功能. 故障详情入 `ads_phm_fault`表 健康评估结果入 `t_phm_sqwx`表中,最终的健康评估需要 union返回.
     * @param spark
     * @param inputData jsonRddToDataset方法处理的结果
     * @param tPhmSqwxLocalHistory `t_phm_sqwx`当前趟中的历史数据
     * @param adsPhmFaultLocalHistory `ads_phm_fault` 当前趟中的历史数据.
     * @return
     * @throws IOException
     */
    public static DatasetContainer processFaultType1(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx1Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10001", "接触器卡合故障");
        // 健康评估处理逻辑:这里根据每个车型、车号、每趟、每个位置上的数据进行判定,判定规则: 当 phm_gzmc
        // 创建 自定义NumberExtractor类,根据`bjwz`和`phm_gzmc`实现对当前DataSet内的的phm_gzmc中文数字进行处理操作.
        NumberExtractor extractor = new NumberExtractor(spark);
        // 经过轴信息返回最终健康评估结果.
        Dataset<Row> rowDataset = extractor.applyUDF((Dataset<Row>) mx1Res.getDataset3());
        Dataset<Row> rowDataset1 = selectColumnsReturnHealthAssessment(rowDataset.withColumn("pgjg", expr("case when extracted_numbers = '1,2,3' or extracted_numbers = '4,5,6' then 'C' else 'B' end"))
                .withColumnRenamed("phm_gzmc", "jgms")
                .withColumnRenamed("extracted_numbers", "zxx"));
        return new DatasetContainer(mx1Res.getDataset1(), mx1Res.getDataset2(), rowDataset1);
    }

    /***
     * 处理HXD1D 模型二:牵引变流器接触器卡分故障视情维修模型 的事情维修和健康评估功能. 故障详情入 `ads_phm_fault`表 健康评估结果入 `t_phm_sqwx`表中,最终的健康评估需要 union返回.
     * @param spark
     * @param inputData jsonRddToDataset方法处理的结果
     * @param tPhmSqwxLocalHistory `t_phm_sqwx`当前趟中的历史数据
     * @param adsPhmFaultLocalHistory `ads_phm_fault` 当前趟中的历史数据.
     * @return
     * @throws IOException
     */
    public static DatasetContainer processFaultType2(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx1Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10002", "接触器卡分故障");
        // 健康评估处理逻辑:这里根据每个车型、车号、每趟、每个位置上的数据进行判定,判定规则: 当 phm_gzmc
        // 创建 自定义NumberExtractor类,根据`bjwz`和`phm_gzmc`实现对当前DataSet内的的phm_gzmc中文数字进行处理操作.
        NumberExtractor extractor = new NumberExtractor(spark);
        // 经过轴信息返回最终健康评估结果.
        Dataset<Row> rowDataset = extractor.applyUDF((Dataset<Row>) mx1Res.getDataset3());
        Dataset<Row> rowDataset1 = selectColumnsReturnHealthAssessment(rowDataset.withColumn("pgjg", expr("case when extracted_numbers = '1,2,3' or extracted_numbers = '4,5,6' then 'C' else 'B' end"))
                .withColumnRenamed("phm_gzmc", "jgms")
                .withColumnRenamed("extracted_numbers", "zxx"));
        return new DatasetContainer(mx1Res.getDataset1(), mx1Res.getDataset2(), rowDataset1);
    }

    /***
     * 3.牵引变流器元件故障视情维修模型 功能开发
     * @param spark
     * @param inputData
     * @param tPhmSqwxLocalHistory
     * @param adsPhmFaultLocalHistory
     * @return
     * @throws IOException
     * @throws ParseException
     */
    public static DatasetContainer processFaultType3(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException, ParseException {
        Dataset<TcmsRealDataJoinMxxq> tcmsRealDataDS = inputData.filter((FilterFunction<TcmsRealDataJoinMxxq>) tcmsRealDataJoinMxxq -> tcmsRealDataJoinMxxq.getMX_ID().equals("10003"));
        // 获取到 ads_phm_fault 当前趟中当前元件的所有的历史数据,这里主要保留 当前当前车型、车号、位置的等字段的基本信息.用于后续关联,再往表中插入数据.
        Dataset<Row> adsPhmFaultLocalHistoryDS = adsPhmFaultLocalHistory.filter(col("mxjg").equalTo("元件故障")).select("s_train_id", "s_fault_id", "mx_id", "s_train_name", "s_train_type_code", "s_fault_source", "s_fault_time", "s_fault_sys", "s_fault_sys_code1", "s_fault_sys_code2", "s_fault_bw", "s_fault_bw_code1", "s_fault_bw_code2", "s_fault_code", "s_fault_name", "phm_lb", "mxjg", "phm_gzmc", "phm_bjwz", "zj_ms", "zj_fa", "pjxlh", "pjdjm", "s_htzt", "s_hkzt", "s_xfzt");
        //获取历史数据中的基本字段信息,这里需要进行去重操作,作为关联的字典表. 后续需要添加的字段: s_train_id,s_fault_id,s_fault_time,phm_gzmc
        Dataset<Row> adsPhmFaultHistoryZdDs = adsPhmFaultLocalHistoryDS.select("mx_id", "s_train_name", "s_train_type_code", "s_fault_source", "s_fault_sys", "s_fault_sys_code1", "s_fault_sys_code2", "s_fault_bw", "s_fault_bw_code1", "s_fault_bw_code2", "s_fault_code", "s_fault_name", "phm_lb", "mxjg", "phm_bjwz", "zj_ms", "zj_fa", "pjxlh", "pjdjm", "s_htzt", "s_hkzt", "s_xfzt").dropDuplicates();
        Dataset<Row> tcmsRealDataPhmFaultZdDs = selectColumnsAdsPhmFault(tcmsRealDataDS).select("mx_id", "s_train_name", "s_train_type_code", "s_fault_source", "s_fault_sys", "s_fault_sys_code1", "s_fault_sys_code2", "s_fault_bw", "s_fault_bw_code1", "s_fault_bw_code2", "s_fault_code", "s_fault_name", "phm_lb", "mxjg", "phm_bjwz", "zj_ms", "zj_fa", "pjxlh", "pjdjm", "s_htzt", "s_hkzt", "s_xfzt").dropDuplicates();
        Dataset<Row> adsPhmFaultZdDs = null;
        if (adsPhmFaultHistoryZdDs.count() > 0) {
            adsPhmFaultZdDs = tcmsRealDataPhmFaultZdDs.union(adsPhmFaultHistoryZdDs).dropDuplicates();
        } else {
            adsPhmFaultZdDs = tcmsRealDataPhmFaultZdDs;
        }
//        System.out.println("ads = = = == 字典 "); // s_train_id,s_fault_id,s_fault_time,phm_gzmc
//        adsPhmFaultZdDs.show(false);
        // 获取 `t_phm_sqwx` 表中字典数据 历史 + 实时数据
        Dataset<Row> tcmsSqwxZdDS = selectColumnsTPhmSqwxIn(tcmsRealDataDS)
                .select("s_train_id", "cx", "lj", "ljjc", "ljm", "psd", "psdjc", "psddm", "ssxt", "xtpjm", "ssbj", "bjpjm", "bjwz", "bjxlh", "bjdjm", "xfzt", "htzt", "hkzt", "status", "czjy", "mx", "dllx", "rc", "yyzl", "sccj", "zzrq", "ljzx", "gzm", "gzly", "zdlb", "yfyy", "hkzbjy", "hkjxjy", "cksj", "mx_id")
                .dropDuplicates();
        Dataset<Row> historySqwxZdDS = selectColumnsTPhmSqwxOut(tPhmSqwxLocalHistory).filter(col("mx").equalTo("元件故障"))
                .withColumn("mx_id", expr("substring_index(substring_index(id, '-', 4), '-', -1)"))
                .withColumn("cksj", expr("substring_index(id, '-', -1)"))
                .select("s_train_id", "cx", "lj", "ljjc", "ljm", "psd", "psdjc", "psddm", "ssxt", "xtpjm", "ssbj", "bjpjm", "bjwz", "bjxlh", "bjdjm", "xfzt", "htzt", "hkzt", "status", "czjy", "mx", "dllx", "rc", "yyzl", "sccj", "zzrq", "ljzx", "gzm", "gzly", "zdlb", "yfyy", "hkzbjy", "hkjxjy", "cksj", "mx_id")
                .dropDuplicates();
        Dataset<Row> sqwxZdDs = null;
        if (historySqwxZdDS.count() > 0) {
            sqwxZdDs = tcmsSqwxZdDS.union(historySqwxZdDS);
        } else {
            sqwxZdDs = tcmsSqwxZdDS;
        }
        // 拉取当前 tcms 中的实时数据,拉取关键字段进行情况判断并返回最终的结果. 分组、开窗、会话划分 + 聚合. // s_fault_time,phm_gzmc
        Dataset<Row> tcmsRealFaultDs = tcmsRealDataDS.select(concat_ws("-", col("s_train_id"), col("phm_bjwz"), col("mx_id"), date_format(col("cksj"), "yyyyMMddHHmmss")).as("id"), col("mx_id"), col("phm_bjwz"),
                col("gzkssj_up").as("s_fault_time"), col("phm_mc").as("phm_gzmc"), col("bjpjm"));
        //|id|mx_id|phm_bjwz|s_fault_time|phm_gzmc|bjpjm|
        //tcmsRealFaultDs.show(false);
        Dataset<Row> adsPhmFaultHistoryDS = adsPhmFaultLocalHistoryDS.select(col("mx_id").as("id"), split(col("mx_id"), "-").getItem(3).as("mx_id"), col("phm_bjwz"), col("s_fault_time"), col("phm_gzmc"), col("s_fault_bw_code2").as("bjpjm"));
        //adsPhmFaultHistoryDS.show(false);
        Dataset<Row> adsPhmFaultUnion = null;
        if (adsPhmFaultHistoryDS.count() > 0) {
            //adsPhmFaultUnion = tcmsRealFaultDs.union(adsPhmFaultHistoryDS);
            // 获取上个批次中当前元件的最大时间 - 5秒 内的历史数据
            String lastBatchMaxFaultTimeStr = adsPhmFaultHistoryDS.agg(max("s_fault_time")).collectAsList().get(0).getString(0);// 获取最大的 s_fault_time
            // 定义时间格式
            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            // 使用自定义时间格式将字符串形式的时间转换为 Timestamp 类型
            Timestamp maxTime = new Timestamp(dateFormat.parse(lastBatchMaxFaultTimeStr).getTime());
            // 将最大时间转换为 Unix 时间戳（以毫秒为单位），然后减去 5 秒
            long maxTimeUnix = maxTime.getTime() - (5 * 1000);
            // 将 Unix 时间戳（以毫秒为单位）转换回 Timestamp 类型
            Timestamp maxTimeMinus5Seconds = new Timestamp(maxTimeUnix);
            // 使用 expr() 创建一个新的筛选条件，选择 s_fault_time 在最大时间的 5 秒前的数据. 注意这个的用法:expr()方法是Apache Spark SQL中的一个函数，它用于创建一个Column对象，该对象表示一个表达式。这个表达式可以是任何合法的SQL表达式，
            Column filterCondition = expr("s_fault_time >= '" + dateFormat.format(maxTimeMinus5Seconds) + "'");
            adsPhmFaultUnion = tcmsRealFaultDs.union(adsPhmFaultHistoryDS.filter(filterCondition));
        } else {
            adsPhmFaultUnion = tcmsRealFaultDs;
        }

        // 斩波管故障来一条就入一条,不涉及到5秒内的情况.因此这里将斩波管故障筛选出来.
        Dataset<Row> zbggzDS = adsPhmFaultUnion.filter(col("phm_gzmc").rlike(".*斩波管故障$")).select(col("id"), col("mx_id"), col("phm_bjwz"), col("bjpjm"), col("phm_gzmc"), col("s_fault_time"), lit("斩波管故障"));

        // 定义窗口函数 |id|mx_id|phm_bjwz|s_fault_time|phm_gzmc|bjpjm|
        WindowSpec windowSpec = Window.partitionBy(col("id"), col("mx_id"), col("phm_bjwz"), col("bjpjm")).orderBy("s_fault_time");
        // 计算每一行与上一行的时间差（单位：秒）
        adsPhmFaultUnion = adsPhmFaultUnion.filter(not(col("phm_gzmc").rlike(".*斩波管故障$"))).withColumn(
                "time_diff",
                unix_timestamp(col("s_fault_time")).minus(lag(unix_timestamp(col("s_fault_time")), 1).over(windowSpec))
        );
        // 判断时间差是否大于等于5秒，如果是，则表示新的会话开始
        Dataset<Row> rankedRealFaults = adsPhmFaultUnion.withColumn(
                "is_new_session",
                when(col("time_diff").isNull().or(col("time_diff").geq(5)), 1).otherwise(0)
        );
        // 计算会话 ID
        rankedRealFaults = rankedRealFaults.withColumn(
                "session_id",
                sum("is_new_session").over(windowSpec)
        );

        Dataset<Row> rowDataset = rankedRealFaults
                .withColumn(
                        "gzmc_group_id",
                        regexp_extract(col("phm_gzmc"), "ACC|L1|L2|L3|M1|M2|M3", 0)
                )
                .withColumn("phm_gzmc", regexp_replace(col("phm_gzmc"), "变流器[1-2]", ""));
        Dataset<Row> aggregatedData = rowDataset
                .groupBy(col("id"), col("mx_id"), col("phm_bjwz"), col("bjpjm"), col("session_id"), col("gzmc_group_id"))
                .agg(
                        concat_ws(",", collect_set(col("phm_gzmc"))).alias("phm_gzmc"),
                        min(col("s_fault_time")).alias("s_fault_time")
                );
        /**
         * 注册一个UDF,这里主要用来对相同会话中的故障数据进行指定顺序排序.
         */
        spark.udf().register("sortAggregatedPhmGzmc", new UDF2<String, String, String>() {
            @Override
            public String call(String gzmcGroupId, String aggregatedPhmGzmc) throws Exception {
                List<String> aggregatedPhmGzmcList = Arrays.asList(aggregatedPhmGzmc.split(","));
                Map<String, List<String>> sortOrderMap = new HashMap<>();
                sortOrderMap.put("ACC", Arrays.asList("ACC元件总故障", "ACC的U相上管故障", "ACC的U相下管故障", "ACC的V相上管故障", "ACC的V相下管故障", "ACC的W相上管故障", "ACC的W相下管故障"));
                sortOrderMap.put("L1", Arrays.asList("L1元件总故障", "L1A相上管故障", "L1A相下管故障", "L1B相上管故障", "L1B相下管故障", "L1C相上管故障", "L1C相下管故障", "L1D相上管故障", "L1D相下管故障"));
                sortOrderMap.put("L2", Arrays.asList("L2元件总故障", "L2A相上管故障", "L2A相下管故障", "L2B相上管故障", "L2B相下管故障", "L2C相上管故障", "L2C相下管故障", "L2D相上管故障", "L2D相下管故障"));
                sortOrderMap.put("L3", Arrays.asList("L3元件总故障", "L3A相上管故障", "L3A相下管故障", "L3B相上管故障", "L3B相下管故障", "L3C相上管故障", "L3C相下管故障", "L3D相上管故障", "L3D相下管故障"));
                sortOrderMap.put("M1", Arrays.asList("M1元件总故障", "M1A相上管故障", "M1A相下管故障", "M1B相上管故障", "M1B相下管故障", "M1C相上管故障", "M1C相下管故障", "M1D相上管故障", "M1D相下管故障"));
                sortOrderMap.put("M2", Arrays.asList("M2元件总故障", "M2A相上管故障", "M2A相下管故障", "M2B相上管故障", "M2B相下管故障", "M2C相上管故障", "M2C相下管故障", "M2D相上管故障", "M2D相下管故障"));
                sortOrderMap.put("M3", Arrays.asList("M3元件总故障", "M3A相上管故障", "M3A相下管故障", "M3B相上管故障", "M3B相下管故障", "M3C相上管故障", "M3C相下管故障", "M3D相上管故障", "M3D相下管故障"));
                List<String> sortOrder;
                if (sortOrderMap.containsKey(gzmcGroupId)) {
                    sortOrder = sortOrderMap.get(gzmcGroupId);
                } else {
                    sortOrder = new ArrayList<String>();
                }
                List<String> sortedList = new ArrayList<String>(sortOrder);
                sortedList.retainAll(aggregatedPhmGzmcList);
                return String.join(", ", sortedList);
            }
        }, DataTypes.StringType);
        // 对 phm_gzmc 字段的内容进行排序,
        Dataset<Row> sortPhmGzmcDS = aggregatedData.withColumn("phm_gzmc", callUDF("sortAggregatedPhmGzmc", col("gzmc_group_id"), col("phm_gzmc")));

        /***
         * 定义一个UDF,从排序后的DataSet中筛选出: 同相上下管故障、A、B相上下管同时故障、C、D相上下管同时故障的数据.再通过这个过滤条件筛选数据集.
         */
        UDF1<String, Boolean> checkSubstring = new UDF1<String, Boolean>() {
            public Boolean call(String input) {
                List<String> substrings = Arrays.stream(input.split(","))
                        .map(String::trim)
                        .collect(Collectors.toList());
                boolean totalFault = substrings.stream().anyMatch(s -> s.contains("总故障"));
                List<String> upFaults = substrings.stream()
                        .filter(s -> s.matches(".*[A-Za-z]相上管故障"))
                        .collect(Collectors.toList());
                List<String> downFaults = substrings.stream()
                        .filter(s -> s.matches(".*[A-Za-z]相下管故障"))
                        .collect(Collectors.toList());
                boolean hasMatchingPair = false;
                boolean hasMultiplePairs = false;
                for (String upFault : upFaults) {
                    String upFaultLetter = upFault.replaceAll("[^A-Za-z]", "");
                    int matchingDownFaults = 0;
                    for (String downFault : downFaults) {
                        String downFaultLetter = downFault.replaceAll("[^A-Za-z]", "");
                        if (upFaultLetter.equals(downFaultLetter)) {
                            matchingDownFaults++;
                            hasMatchingPair = true;
                        }
                    }
                    if (matchingDownFaults > 1) {
                        hasMultiplePairs = true;
                        break;
                    }
                }
                return totalFault && hasMatchingPair && !hasMultiplePairs;
            }
        };
        UserDefinedFunction checkSubstringUDF = functions.udf(checkSubstring, DataTypes.BooleanType);
        // 过滤出: A、B | C、D | 同向 上下管故障的数据
        Dataset<Row> abAdndCdAndSameDS = sortPhmGzmcDS.filter(checkSubstringUDF.apply(sortPhmGzmcDS.col("phm_gzmc")));
        //定义一个UDF,将当前的排序结果中`sorted_aggregated_phm_gzmc`补充完整
        // 定义一个UDF，将给定的前缀和phm_bjwz添加到逗号分隔的字符串中的每个元素上
        UDF2<String, String, String> concatPrefix = (phm_bjwz, s) -> {
            List<String> elements = Arrays.asList(s.split(","));
            return elements.stream()
                    .map(e -> "主变流器" + phm_bjwz + e.trim())
                    .collect(Collectors.joining(", "));
        };
        // 注册UDF
        UserDefinedFunction concatPrefixUDF = functions.udf(concatPrefix, DataTypes.StringType);
        Dataset<Row> rowDataset1 = abAdndCdAndSameDS.withColumn("phm_gzmc", concatPrefixUDF.apply(col("phm_bjwz"), col("phm_gzmc"))).drop(col("session_id")).drop("gzmc_group_id");
        // 所有数据的集合
        Dataset<Row> allSortPhmGzmcDs = sortPhmGzmcDS.withColumn("phm_gzmc", concatPrefixUDF.apply(col("phm_bjwz"), col("phm_gzmc"))).withColumn("phm_gzmc", concatPrefixUDF.apply(col("phm_bjwz"), col("phm_gzmc")));
        // 定义正则表达式,过滤出:A、B相上下管同时故障的数据.
        String regexAB = "^主变流器[12]\\s*[LM][123]元件总故障\\s*,\\s*主变流器[12]\\s*[LM][123]A相上管故障\\s*,\\s*主变流器[12]\\s*[LM][123]A相下管故障\\s*,\\s*主变流器[12]\\s*[LM][123]B相上管故障\\s*,\\s*主变流器[12]\\s*[LM][123]B相下管故障$";
        // 定义正则表达式,过滤出:C、D相上下管同时故障的数据.
        String regexCD = "^主变流器[12]([LM][123]元件总故障)(\\s*,\\s*主变流器[12][LM][123][ABCD]相(上|下)管故障)*(\\s*,){0,1}\\s*主变流器[12]([LM][123]C相上管故障)\\s*,\\s*主变流器[12]([LM][123]C相下管故障)\\s*,\\s*主变流器[12]([LM][123]D相上管故障)\\s*,\\s*主变流器[12]([LM][123]D相下管故障)$";
        // 使用正则表达式过滤 sorted_aggregated_phm_gzmc 字段
        Column regexFilterAB = functions.col("phm_gzmc").rlike(regexAB);
        Column regexFilterCD = functions.col("phm_gzmc").rlike(regexCD);
        Dataset<Row> abDS = rowDataset1.filter(regexFilterAB).withColumn("mxmc", lit("A、B相上下管同时故障")).drop(col("session_id")).drop(col("gzmc_group_id"));
        Dataset<Row> cdDS = rowDataset1.filter(regexFilterCD).withColumn("mxmc", lit("C、D相上下管同时故障")).drop(col("session_id")).drop(col("gzmc_group_id"));
        // 2023-04-18,在添加 ZDLB - 诊断类别 这个字段的值写死: 模型诊断信息 和 第一次入库时间 的功能完善上,发现这里会报空指针,这里修改过.
        Dataset<Row> sameDS = null;
        Dataset<Row> tempDS = unionWithNonEmptyDatasets(abDS, cdDS);
        if (tempDS != null) {
            tempDS = tempDS.drop(col("mxmc"));
            sameDS = rowDataset1.except(tempDS).withColumn("mxmc", lit("同相上下管故障")).drop(col("session_id")).drop(col("gzmc_group_id"));
        } else {
            sameDS = rowDataset1.withColumn("mxmc", lit("同相上下管故障")).drop(col("session_id")).drop(col("gzmc_group_id"));
        }
        //单管故障
        Dataset<Row> dgGzDs = allSortPhmGzmcDs.alias("t1").join(rowDataset1.alias("t2"),
                        expr("t1.id = t2.id"), "left")
                .filter(expr("t2.id is null")).selectExpr("t1.*").withColumn("mxmc", lit("单管故障")).drop(col("session_id")).drop(col("gzmc_group_id"));
        // 当前批次 最终的 mxmc 结果
        Dataset<Row> rowDataset2 = unionWithNonEmptyDatasets(abDS, cdDS, sameDS, dgGzDs, zbggzDS);
        // ads_phm_fault 表中字典和 当前批次报出的故障数据进行关联入库操作
        UserDefinedFunction generateUUID = udf((input) -> UUID.randomUUID().toString().substring(0, 16), DataTypes.StringType);
        // 注册 UDF
        spark.udf().register("generateUUID", generateUUID);
        Dataset<Row> insertAdsPhmFaultDS = adsPhmFaultZdDs.alias("t1").join(rowDataset2.selectExpr("id", "phm_gzmc", "s_fault_time").alias("t2"), expr("t1.mx_id = t2.id"), "inner")
                .withColumn("s_train_id", col("s_train_name"))
                .withColumn("s_fault_id", callUDF("generateUUID", current_timestamp()))
                .select("s_train_id", "s_fault_id", "mx_id", "s_train_name", "s_train_type_code", "s_fault_source", "s_fault_time", "s_fault_sys", "s_fault_sys_code1", "s_fault_sys_code2", "s_fault_bw", "s_fault_bw_code1", "s_fault_bw_code2", "s_fault_code", "s_fault_name", "phm_lb", "mxjg", "phm_gzmc", "phm_bjwz", "zj_ms", "zj_fa", "pjxlh", "pjdjm", "s_htzt", "s_hkzt", "s_xfzt");
        // 最终插入到 ads_phm_fault 表中的数据
        // insertAdsPhmFaultDS.show(false);

        // ===========================================================   插入到 `t_phm_sqwx` 表中数据处理.
        // 当前实时批次中报的故障数据 id,s_train_id,bjpjm,bjwz,jgms,mxmc
        Dataset<Row> selectJkpgDs = rowDataset2.select(col("id"), concat_ws("-", lit("HXD1D"), split(col("id"), "-").getItem(1)).as("s_train_id"), lit("PJ00003").as("bjpjm"),
                col("phm_bjwz").as("bjwz"), col("phm_gzmc").as("jgms"), col("mxmc"));
        // 拉取到 t_phm_sqwx 当前趟的历史数据,这里需要和 tcms聚合后的结果进行聚合. id,s_train_id,bjpjm,bjwz,jgms,mxmc
        Dataset<Row> selectHistory = tPhmSqwxLocalHistory
                .filter(split(col("id"), "-").getItem(3).equalTo("10003"))
                .select(col("id"), col("s_train_id"), col("bjpjm"), col("bjwz"), col("mxms").as("jgms"), col("mxmc"));
        Dataset<Row> unionDs = unionWithNonEmptyDatasets(selectJkpgDs, selectHistory);
        Dataset<Row> aggSqwxDs = unionDs.groupBy(col("id"))
                .agg(
                        concat_ws(",", collect_set(col("jgms"))).as("mxms"),
                        concat_ws(",", collect_set(col("mxmc"))).as("mxmc")
                )
                .withColumn("mxms", expr("distinctString(mxms)"))
                .withColumn("mxmc", expr("distinctString(mxmc)"));
        Dataset<Row> insertSqwxFinal = aggSqwxDs.alias("t1").join(sqwxZdDs.alias("t2"), expr("t1.id = concat_ws('-',s_train_id,bjwz,mx_id,cksj)"), "inner")
                .withColumn("create_time", current_timestamp())
                .select("id", "s_train_id", "cx", "lj", "ljjc", "ljm", "psd", "psdjc", "psddm", "ssxt", "xtpjm", "ssbj", "bjpjm", "bjwz", "bjxlh", "bjdjm", "xfzt", "htzt", "hkzt", "create_time", "status", "czjy", "mx", "mxmc", "mxms", "dllx", "rc", "yyzl", "sccj", "zzrq", "ljzx", "gzm", "gzly", "zdlb", "yfyy", "hkzbjy", "hkjxjy").dropDuplicates();
        //insertSqwxFinal.show(false);

        // ===========================================================   插入到 `t_phm_sqwx` 表中数据处理.

        // 健康评估字段: |s_train_id|bjpjm  |bjwz|mxmc |pgjg|zxx  |jgms                                                                                     |
        Dataset<Row> yjgzJkpgDs = unionDs.groupBy(col("s_train_id"), col("bjpjm"), col("bjwz"))
                .agg(
                        collect_set(col("mxmc")).as("mxmc_array"),
                        concat_ws(",", collect_set(col("jgms"))).as("jgms_2")
                )
                .withColumn("mxmc", lit("10003"))
                .withColumn("pgjg", when(size(col("mxmc_array")).geq(2), "C").otherwise("B"))
                //.withColumn("jgms", concat_ws(",", col("mxmc_array")))
                .withColumn("jgms", expr("distinctString(concat_ws(',',mxmc_array))"))
                .select(col("s_train_id"), col("bjpjm"), col("bjwz"), col("mxmc"), col("pgjg"), lit("").as("zxx"), col("jgms"));
        return new DatasetContainer(insertAdsPhmFaultDS, insertSqwxFinal, yjgzJkpgDs);
    }


    /***
     * 处理HXD1D 模型四:牵引变流器TCU通讯故障视情维修模型 的事情维修和健康评估功能. 故障详情入 `ads_phm_fault`表 健康评估结果入 `t_phm_sqwx`表中,最终的健康评估需要 union返回.
     * @param spark
     * @param inputData jsonRddToDataset方法处理的结果
     * @param tPhmSqwxLocalHistory `t_phm_sqwx`当前趟中的历史数据
     * @param adsPhmFaultLocalHistory `ads_phm_fault` 当前趟中的历史数据.
     * @return
     * @throws IOException
     */
    public static DatasetContainer processFaultType4(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx1Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10004", "TCU通讯故障");
        // 写代码处理 健康评估的部分......
        Dataset<Row> rowDataset = selectColumnsReturnHealthAssessment(mx1Res.getDataset3()
                .withColumn("pgjg", when(size(split(col("phm_gzmc"), ",")).geq("1"), "C"))
                .withColumn("zxx", lit(""))
                .withColumnRenamed("phm_gzmc", "jgms"));
        return new DatasetContainer(mx1Res.getDataset1(), mx1Res.getDataset2(), rowDataset);
    }

    /***
     * 处理HXD1D 模型五:牵引变流器SMC检测Ud异常报警故障视情维修模型 的事情维修和健康评估功能. 故障详情入 `ads_phm_fault`表 健康评估结果入 `t_phm_sqwx`表中,最终的健康评估需要 union返回.
     * @param spark
     * @param inputData jsonRddToDataset方法处理的结果
     * @param tPhmSqwxLocalHistory `t_phm_sqwx`当前趟中的历史数据
     * @param adsPhmFaultLocalHistory `ads_phm_fault` 当前趟中的历史数据.
     * @return
     * @throws IOException
     */
    public static DatasetContainer processFaultType5(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx1Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10005", "SMC检测Ud异常报警故障");
        // 写代码处理 健康评估的部分......
        Dataset<Row> rowDataset = selectColumnsReturnHealthAssessment(mx1Res.getDataset3()
                .withColumn("pgjg", when(size(split(col("phm_gzmc"), ",")).geq("1"), "C"))
                .withColumn("zxx", lit(""))
                .withColumnRenamed("phm_gzmc", "jgms"));
        return new DatasetContainer(mx1Res.getDataset1(), mx1Res.getDataset2(), rowDataset);
    }

    /***
     * 处理HXD1D 模型六:牵引变流器高网压报警故障视情维修模型 的事情维修和健康评估功能. 故障详情入 `ads_phm_fault`表 健康评估结果入 `t_phm_sqwx`表中,最终的健康评估需要 union返回.
     * @param spark
     * @param inputData jsonRddToDataset方法处理的结果
     * @param tPhmSqwxLocalHistory `t_phm_sqwx`当前趟中的历史数据
     * @param adsPhmFaultLocalHistory `ads_phm_fault` 当前趟中的历史数据.
     * @return
     * @throws IOException
     */
    public static DatasetContainer processFaultType6(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx1Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10006", "高网压报警故障");
        // 写代码处理 健康评估的部分......
        Dataset<Row> rowDataset = selectColumnsReturnHealthAssessment(mx1Res.getDataset3()
                .withColumn("pgjg", when(size(split(col("phm_gzmc"), ",")).geq("1"), "C"))
                .withColumn("zxx", lit(""))
                .withColumnRenamed("phm_gzmc", "jgms"));
        return new DatasetContainer(mx1Res.getDataset1(), mx1Res.getDataset2(), rowDataset);
    }

    /***
     * 处理HXD1D 模型七:牵引变流器低网压报警故障视情维修模型 的事情维修和健康评估功能. 故障详情入 `ads_phm_fault`表 健康评估结果入 `t_phm_sqwx`表中,最终的健康评估需要 union返回.
     * @param spark
     * @param inputData jsonRddToDataset方法处理的结果
     * @param tPhmSqwxLocalHistory `t_phm_sqwx`当前趟中的历史数据
     * @param adsPhmFaultLocalHistory `ads_phm_fault` 当前趟中的历史数据.
     * @return
     * @throws IOException
     */
    public static DatasetContainer processFaultType7(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx1Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10007", "低网压报警故障");
        // 写代码处理 健康评估的部分......
        Dataset<Row> rowDataset = selectColumnsReturnHealthAssessment(mx1Res.getDataset3()
                .withColumn("pgjg", when(size(split(col("phm_gzmc"), ",")).geq("1"), "C"))
                .withColumn("zxx", lit(""))
                .withColumnRenamed("phm_gzmc", "jgms"));
        return new DatasetContainer(mx1Res.getDataset1(), mx1Res.getDataset2(), rowDataset);
    }

    /***
     * 处理HXD1D 模型八:牵引变流器辅逆输出过压报警故障视情维修模型 的事情维修和健康评估功能. 故障详情入 `ads_phm_fault`表 健康评估结果入 `t_phm_sqwx`表中,最终的健康评估需要 union返回.
     * @param spark
     * @param inputData jsonRddToDataset方法处理的结果
     * @param tPhmSqwxLocalHistory `t_phm_sqwx`当前趟中的历史数据
     * @param adsPhmFaultLocalHistory `ads_phm_fault` 当前趟中的历史数据.
     * @return
     * @throws IOException
     */
    public static DatasetContainer processFaultType8(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx1Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10008", "辅逆输出过压报警故障");
        Dataset<Row> rowDataset = selectColumnsReturnHealthAssessment(mx1Res.getDataset3()
                .withColumn("pgjg", when(size(split(col("phm_gzmc"), ",")).geq("1"), "C"))
                .withColumn("zxx", lit(""))
                .withColumnRenamed("phm_gzmc", "jgms"));
        return new DatasetContainer(mx1Res.getDataset1(), mx1Res.getDataset2(), rowDataset);
    }

    /***
     * 处理HXD1D 模型九:牵引变流器辅逆输出欠压报警故障视情维修模型 的事情维修和健康评估功能. 故障详情入 `ads_phm_fault`表 健康评估结果入 `t_phm_sqwx`表中,最终的健康评估需要 union返回.
     * @param spark
     * @param inputData jsonRddToDataset方法处理的结果
     * @param tPhmSqwxLocalHistory `t_phm_sqwx`当前趟中的历史数据
     * @param adsPhmFaultLocalHistory `ads_phm_fault` 当前趟中的历史数据.
     * @return
     * @throws IOException
     */
    public static DatasetContainer processFaultType9(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx1Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10009", "辅逆输出欠压报警故障");
        Dataset<Row> rowDataset = selectColumnsReturnHealthAssessment(mx1Res.getDataset3()
                .withColumn("pgjg", when(size(split(col("phm_gzmc"), ",")).geq("1"), "C"))
                .withColumn("zxx", lit(""))
                .withColumnRenamed("phm_gzmc", "jgms"));
        return new DatasetContainer(mx1Res.getDataset1(), mx1Res.getDataset2(), rowDataset);
    }

    /***
     * 处理HXD1D 模型十:牵引变流器辅逆输出不平衡报警故障视情维修模型 的事情维修和健康评估功能. 故障详情入 `ads_phm_fault`表 健康评估结果入 `t_phm_sqwx`表中,最终的健康评估需要 union返回.
     * @param spark
     * @param inputData jsonRddToDataset方法处理的结果
     * @param tPhmSqwxLocalHistory `t_phm_sqwx`当前趟中的历史数据
     * @param adsPhmFaultLocalHistory `ads_phm_fault` 当前趟中的历史数据.
     * @return
     * @throws IOException
     */
    public static DatasetContainer processFaultType10(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx1Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10010", "辅逆输出不平衡报警故障");
        Dataset<Row> rowDataset = selectColumnsReturnHealthAssessment(mx1Res.getDataset3()
                // .withColumn("pgjg", when(size(split(col("phm_gzmc"), ",")).geq("1"), "C").otherwise("B"))
                .withColumn("pgjg", when(size(split(col("phm_gzmc"), ",")).geq("1"), "C"))
                .withColumn("zxx", lit(""))
                .withColumnRenamed("phm_gzmc", "jgms"));
        return new DatasetContainer(mx1Res.getDataset1(), mx1Res.getDataset2(), rowDataset);
    }

    private static DatasetContainer processFaultType11(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx11Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10011", "辅逆输出过流报警故障");
        //处理健康评估逻辑
        Dataset<Row> dataset3 = (Dataset<Row>) mx11Res.getDataset3();
        dataset3.createOrReplaceTempView("jkpg_mx11_temp_table");
        Dataset<Row> sqlDataset11 = spark.sql("select *,HealthAssessmentModelUDF(mxmc,phm_gzmc)AS RESULT from jkpg_mx11_temp_table");
        Dataset<Row> jkbpDataset11 = sqlDataset11.withColumn("NEWRESULT", split(col("RESULT"), ";"))
                .select(col("S_TRAIN_ID"),
                        col("BJPJM"),
                        col("BJWZ"),
                        col("MXMC"),
                        col("NEWRESULT").getItem(0).as("PGJG"),
                        col("NEWRESULT").getItem(1).as("ZXX"),
                        col("phm_gzmc").as("jgms")
                );
        return new DatasetContainer(mx11Res.getDataset1(), mx11Res.getDataset2(), jkbpDataset11);
    }

    private static DatasetContainer processFaultType12(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx12Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10012", "辅逆接地报警故障");
        //处理健康评估逻辑
        Dataset<Row> dataset3 = (Dataset<Row>) mx12Res.getDataset3();
        dataset3.createOrReplaceTempView("jkpg_mx12_temp_table");
        Dataset<Row> sqlDataset12 = spark.sql("select *,HealthAssessmentModelUDF(mxmc,phm_gzmc)AS RESULT from jkpg_mx12_temp_table");
        Dataset<Row> jkbpDataset12 = sqlDataset12.withColumn("NEWRESULT", split(col("RESULT"), ";"))
                .select(col("S_TRAIN_ID"),
                        col("BJPJM"),
                        col("BJWZ"),
                        col("MXMC"),
                        col("NEWRESULT").getItem(0).as("PGJG"),
                        col("NEWRESULT").getItem(1).as("ZXX"),
                        col("phm_gzmc").as("jgms")
                );
        return new DatasetContainer(mx12Res.getDataset1(), mx12Res.getDataset2(), jkbpDataset12);
    }

    private static DatasetContainer processFaultType13(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx13Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10013", "原边过流报警故障");
        //处理健康评估逻辑
        Dataset<Row> dataset3 = (Dataset<Row>) mx13Res.getDataset3();
        dataset3.createOrReplaceTempView("jkpg_mx13_temp_table");
        Dataset<Row> sqlDataset13 = spark.sql("select *,HealthAssessmentModelUDF(mxmc,phm_gzmc)AS RESULT from jkpg_mx13_temp_table");
        Dataset<Row> jkbpDataset13 = sqlDataset13.withColumn("NEWRESULT", split(col("RESULT"), ";"))
                .select(col("S_TRAIN_ID"),
                        col("BJPJM"),
                        col("BJWZ"),
                        col("MXMC"),
                        col("NEWRESULT").getItem(0).as("PGJG"),
                        col("NEWRESULT").getItem(1).as("ZXX"),
                        col("phm_gzmc").as("jgms")
                );
        return new DatasetContainer(mx13Res.getDataset1(), mx13Res.getDataset2(), jkbpDataset13);
    }

    private static DatasetContainer processFaultType14(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx14Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10014", "原边接地报警故障");
        //处理健康评估逻辑
        Dataset<Row> dataset3 = (Dataset<Row>) mx14Res.getDataset3();
        dataset3.createOrReplaceTempView("jkpg_mx14_temp_table");
        Dataset<Row> sqlDataset14 = spark.sql("select *,HealthAssessmentModelUDF(mxmc,phm_gzmc)AS RESULT from jkpg_mx14_temp_table");
        Dataset<Row> jkbpDataset14 = sqlDataset14.withColumn("NEWRESULT", split(col("RESULT"), ";"))
                .select(col("S_TRAIN_ID"),
                        col("BJPJM"),
                        col("BJWZ"),
                        col("MXMC"),
                        col("NEWRESULT").getItem(0).as("PGJG"),
                        col("NEWRESULT").getItem(1).as("ZXX"),
                        col("phm_gzmc").as("jgms")
                );
        return new DatasetContainer(mx14Res.getDataset1(), mx14Res.getDataset2(), jkbpDataset14);
    }

    private static DatasetContainer processFaultType15(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx15Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10015", "直流过压报警故障");
        //处理健康评估逻辑
        Dataset<Row> dataset3 = (Dataset<Row>) mx15Res.getDataset3();
        dataset3.createOrReplaceTempView("jkpg_mx15_temp_table");
        Dataset<Row> sqlDataset15 = spark.sql("select *,HealthAssessmentModelUDF(mxmc,phm_gzmc)AS RESULT from jkpg_mx15_temp_table");
        Dataset<Row> jkbpDataset15 = sqlDataset15.withColumn("NEWRESULT", split(col("RESULT"), ";"))
                .select(col("S_TRAIN_ID"),
                        col("BJPJM"),
                        col("BJWZ"),
                        col("MXMC"),
                        col("NEWRESULT").getItem(0).as("PGJG"),
                        col("NEWRESULT").getItem(1).as("ZXX"),
                        col("phm_gzmc").as("jgms")
                );
        return new DatasetContainer(mx15Res.getDataset1(), mx15Res.getDataset2(), jkbpDataset15);
    }

    private static DatasetContainer processFaultType16(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx16Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10016", "输入过流报警故障");
        //处理健康评估逻辑
        Dataset<Row> dataset3 = (Dataset<Row>) mx16Res.getDataset3();
        dataset3.createOrReplaceTempView("jkpg_mx16_temp_table");
        Dataset<Row> sqlDataset16 = spark.sql("select *,HealthAssessmentModelUDF(mxmc,phm_gzmc)AS RESULT from jkpg_mx16_temp_table");
        Dataset<Row> jkbpDataset16 = sqlDataset16.withColumn("NEWRESULT", split(col("RESULT"), ";"))
                .select(col("S_TRAIN_ID"),
                        col("BJPJM"),
                        col("BJWZ"),
                        col("MXMC"),
                        col("NEWRESULT").getItem(0).as("PGJG"),
                        col("NEWRESULT").getItem(1).as("ZXX"),
                        col("phm_gzmc").as("jgms")
                );
        return new DatasetContainer(mx16Res.getDataset1(), mx16Res.getDataset2(), jkbpDataset16);
    }

    private static DatasetContainer processFaultType17(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx17Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10017", "主回路接地报警故障");
        //处理健康评估逻辑
        Dataset<Row> dataset3 = (Dataset<Row>) mx17Res.getDataset3();
        dataset3.createOrReplaceTempView("jkpg_mx17_temp_table");
        Dataset<Row> sqlDataset17 = spark.sql("select *,HealthAssessmentModelUDF(mxmc,phm_gzmc)AS RESULT from jkpg_mx17_temp_table");
        Dataset<Row> jkbpDataset17 = sqlDataset17.withColumn("NEWRESULT", split(col("RESULT"), ";"))
                .select(col("S_TRAIN_ID"),
                        col("BJPJM"),
                        col("BJWZ"),
                        col("MXMC"),
                        col("NEWRESULT").getItem(0).as("PGJG"),
                        col("NEWRESULT").getItem(1).as("ZXX"),
                        col("phm_gzmc").as("jgms")
                );
        return new DatasetContainer(mx17Res.getDataset1(), mx17Res.getDataset2(), jkbpDataset17);
    }

    private static DatasetContainer processFaultType18(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx18Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10018", "充电超时报警故障");
        //处理健康评估逻辑
        Dataset<Row> dataset3 = (Dataset<Row>) mx18Res.getDataset3();
        dataset3.createOrReplaceTempView("jkpg_mx18_temp_table");
        Dataset<Row> sqlDataset18 = spark.sql("select *,HealthAssessmentModelUDF(mxmc,phm_gzmc)AS RESULT from jkpg_mx18_temp_table");
        Dataset<Row> jkbpDataset18 = sqlDataset18.withColumn("NEWRESULT", split(col("RESULT"), ";"))
                .select(col("S_TRAIN_ID"),
                        col("BJPJM"),
                        col("BJWZ"),
                        col("MXMC"),
                        col("NEWRESULT").getItem(0).as("PGJG"),
                        col("NEWRESULT").getItem(1).as("ZXX"),
                        col("phm_gzmc").as("jgms")
                );
        return new DatasetContainer(mx18Res.getDataset1(), mx18Res.getDataset2(), jkbpDataset18);
    }

    private static DatasetContainer processFaultType19(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx19Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10019", "逆变过流报警故障");
        //处理健康评估逻辑
        Dataset<Row> dataset3 = (Dataset<Row>) mx19Res.getDataset3();
        dataset3.createOrReplaceTempView("jkpg_mx19_temp_table");
        Dataset<Row> sqlDataset19 = spark.sql("select *,HealthAssessmentModelUDF(mxmc,phm_gzmc)AS RESULT from jkpg_mx19_temp_table");
        Dataset<Row> jkbpDataset19 = sqlDataset19.withColumn("NEWRESULT", split(col("RESULT"), ";"))
                .select(col("S_TRAIN_ID"),
                        col("BJPJM"),
                        col("BJWZ"),
                        col("MXMC"),
                        col("NEWRESULT").getItem(0).as("PGJG"),
                        col("NEWRESULT").getItem(1).as("ZXX"),
                        col("phm_gzmc").as("jgms")
                );
        return new DatasetContainer(mx19Res.getDataset1(), mx19Res.getDataset2(), jkbpDataset19);
    }

    private static DatasetContainer processFaultType20(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx20Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10020", "斩波过流报警故障");
        //处理健康评估逻辑
        Dataset<Row> dataset3 = (Dataset<Row>) mx20Res.getDataset3();
        dataset3.createOrReplaceTempView("jkpg_mx20_temp_table");
        Dataset<Row> sqlDataset20 = spark.sql("select *,HealthAssessmentModelUDF(mxmc,phm_gzmc)AS RESULT from jkpg_mx20_temp_table");
        Dataset<Row> jkbpDataset20 = sqlDataset20.withColumn("NEWRESULT", split(col("RESULT"), ";"))
                .select(col("S_TRAIN_ID"),
                        col("BJPJM"),
                        col("BJWZ"),
                        col("MXMC"),
                        col("NEWRESULT").getItem(0).as("PGJG"),
                        col("NEWRESULT").getItem(1).as("ZXX"),
                        col("phm_gzmc").as("jgms")
                );
        return new DatasetContainer(mx20Res.getDataset1(), mx20Res.getDataset2(), jkbpDataset20);
    }


    /***
     * 处理HXD1D 模型二十一:牵引变流器斩波超温报警故障视情维修模型 的事情维修和健康评估功能. 故障详情入 `ads_phm_fault`表 健康评估结果入 `t_phm_sqwx`表中,最终的健康评估需要 union返回.
     * @param spark
     * @param inputData jsonRddToDataset方法处理的结果
     * @param tPhmSqwxLocalHistory `t_phm_sqwx`当前趟中的历史数据
     * @param adsPhmFaultLocalHistory `ads_phm_fault` 当前趟中的历史数据.
     * @return
     * @throws IOException
     */
    public static DatasetContainer processFaultType21(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx1Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10021", "斩波超温报警故障");
        Dataset<Row> rowDataset = selectColumnsReturnHealthAssessment(mx1Res.getDataset3()
                .withColumn("pgjg", when(size(split(col("phm_gzmc"), ",")).equalTo("3"), "C").otherwise("B"))
                .withColumn("zxx", lit(""))
                .withColumnRenamed("phm_gzmc", "jgms"));
        return new DatasetContainer(mx1Res.getDataset1(), mx1Res.getDataset2(), rowDataset);
    }

    /***
     * 22、牵引变流器模块过热故障视情维修模型 视情维修和健康评估结果
     * @param spark
     * @param inputData
     * @param tPhmSqwxLocalHistory
     * @param adsPhmFaultLocalHistory
     * @return
     * @throws IOException
     * @throws ParseException
     */
    public static DatasetContainer processFaultType22(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException, ParseException {
        Dataset<TcmsRealDataJoinMxxq> tcmsRealDataDS = inputData.filter((FilterFunction<TcmsRealDataJoinMxxq>) tcmsRealDataJoinMxxq -> tcmsRealDataJoinMxxq.getMX_ID().equals("10022"));

        // 从历史数据中拉取当前元件故障数据中的最后10秒的数据,判断是否存在 故障 组合情况.
        Dataset<Row> adsPhmFaultLocalHistoryDS = adsPhmFaultLocalHistory.filter(col("mxjg").equalTo("模块过热")).select("s_train_id", "s_fault_id", "mx_id", "s_train_name", "s_train_type_code", "s_fault_source", "s_fault_time", "s_fault_sys", "s_fault_sys_code1", "s_fault_sys_code2", "s_fault_bw", "s_fault_bw_code1", "s_fault_bw_code2", "s_fault_code", "s_fault_name", "phm_lb", "mxjg", "phm_gzmc", "phm_bjwz", "zj_ms", "zj_fa", "pjxlh", "pjdjm", "s_htzt", "s_hkzt", "s_xfzt");
        Dataset<Row> tcmsRealDataAdsPhmFaultDS = selectColumnsAdsPhmFault(tcmsRealDataDS);
        Dataset<Row> adsPhmFaultAllDS = null;
        if (adsPhmFaultLocalHistoryDS.count() > 0) {
            // 如果当前元件故障存在历史数据,则拉取到最后的10秒的数据,并判断是否存在故障名称的关联关系.
            String lastBatchMaxFaultTimeStr = adsPhmFaultLocalHistoryDS.agg(max("s_fault_time")).collectAsList().get(0).getString(0); //获取上一个批次中当前元件的 最大的 s_fault_time
            // 定义时间格式
            SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            // 使用自定义时间格式将字符串形式的时间转换为 Timestamp 类型
            Timestamp maxTime = new Timestamp(dateFormat.parse(lastBatchMaxFaultTimeStr).getTime());
            // 将最大时间转换为 Unix 时间戳（以毫秒为单位），然后减去 10 秒
            long maxTimeUnix = maxTime.getTime() - (10 * 1000);
            // 将 Unix 时间戳（以毫秒为单位）转换回 Timestamp 类型
            Timestamp maxTimeMinus10Seconds = new Timestamp(maxTimeUnix);
            // 使用 expr() 创建一个新的筛选条件，选择 s_fault_time 在最大时间的 10秒前的数据.
            Column filterCondition = expr("s_fault_time >= '" + dateFormat.format(maxTimeMinus10Seconds) + "'");
            // 获取到上个批次最后10秒的数据
            Dataset<Row> lastBatch10SDs = adsPhmFaultLocalHistoryDS.filter(filterCondition);
            adsPhmFaultAllDS = lastBatch10SDs.union(tcmsRealDataAdsPhmFaultDS);
        } else {
            adsPhmFaultAllDS = tcmsRealDataAdsPhmFaultDS;
        }
        // 定义窗口函数,这里不需要 s_fault_id , phm_gzmc , s_fault_time  需要取到最小值.
        WindowSpec windowSpec = Window.partitionBy("s_train_id", "mx_id", "s_train_name", "s_train_type_code", "s_fault_source", "s_fault_sys", "s_fault_sys_code1", "s_fault_sys_code2", "s_fault_bw", "s_fault_bw_code1", "s_fault_bw_code2", "s_fault_code", "s_fault_name", "phm_lb", "mxjg", "phm_bjwz", "zj_ms", "zj_fa", "pjxlh", "pjdjm", "s_htzt", "s_hkzt", "s_xfzt").orderBy("s_fault_time");
        // 计算每一行与上一行的时间差（单位：秒）
        Dataset<Row> allProcessRealFaultsSecondDiff = adsPhmFaultAllDS.withColumn(
                "time_diff",
                unix_timestamp(col("s_fault_time")).minus(lag(unix_timestamp(col("s_fault_time")), 1).over(windowSpec))
        );
        // 判断时间差是否大于等于10秒，如果是，则表示新的会话开始
        Dataset<Row> allProcessRealFaultsSessionFlag = allProcessRealFaultsSecondDiff.withColumn(
                "is_new_session",
                when(col("time_diff").isNull().or(col("time_diff").geq(10)), 1).otherwise(0)
        );
        // 计算会话 ID
        Dataset<Row> allProcessRealFaultsSessionId = allProcessRealFaultsSessionFlag.withColumn(
                "session_id",
                sum("is_new_session").over(windowSpec)
        );
        UserDefinedFunction generateUUID = udf((input) -> UUID.randomUUID().toString().substring(0, 16), DataTypes.StringType);
        // 注册 UDF
        spark.udf().register("generateUUID", generateUUID);
        Dataset<Row> finalInsertAdsPhmFaultAddMxmcDS = allProcessRealFaultsSessionId.groupBy("s_train_id", "mx_id", "s_train_name", "s_train_type_code", "s_fault_source", "s_fault_sys", "s_fault_sys_code1", "s_fault_sys_code2", "s_fault_bw", "s_fault_bw_code1", "s_fault_bw_code2", "s_fault_code", "s_fault_name", "phm_lb", "mxjg", "phm_bjwz", "zj_ms", "zj_fa", "pjxlh", "pjdjm", "s_htzt", "s_hkzt", "s_xfzt", "session_id")
                .agg(
                        collect_set(col("phm_gzmc")).alias("phm_gzmc"),
                        min(col("s_fault_time")).alias("s_fault_time")
                )
                .withColumn("mxmc", when(size(col("phm_gzmc")).geq(2), lit("所有模块均过热")) // 当 element_nums 大于等于 2 时 "所有模块均过热"
                        .otherwise(regexp_replace(concat_ws("", col("phm_gzmc")), "变流器[1-2]", ""))
                )
                .withColumn("phm_gzmc", concat_ws(",", col("phm_gzmc")))
                .withColumn("s_fault_id", callUDF("generateUUID", current_timestamp()));
        Dataset<Row> finalInsertAdsPhmFaultDS = finalInsertAdsPhmFaultAddMxmcDS.select("s_train_id", "s_fault_id", "mx_id", "s_train_name", "s_train_type_code", "s_fault_source", "s_fault_time", "s_fault_sys", "s_fault_sys_code1", "s_fault_sys_code2", "s_fault_bw", "s_fault_bw_code1", "s_fault_bw_code2", "s_fault_code", "s_fault_name", "phm_lb", "mxjg", "phm_gzmc", "phm_bjwz", "zj_ms", "zj_fa", "pjxlh", "pjdjm", "s_htzt", "s_hkzt", "s_xfzt");
        // 最终插入到 ads_phm_fault 这个表中的数据 finalInsertAdsPhmFaultDS

        // 视情维修处理:
        // t_phm_sqwx 这张表中的历史数据字段.
        //s_train_id,cx,lj,ljjc,ljm,psd,psdjc,psddm,ssxt,xtpjm,ssbj,bjpjm,bjwz,bjxlh,bjdjm,xfzt,htzt,hkzt,status,czjy,mx,mxmc,mxms,dllx,rc,yyzl,sccj,zzrq,ljzx,gzm,gzly,zdlb,yfyy,hkzbjy,hkjxjy,cksj,mx_id
        Dataset<Row> localHistorySqwxDS = selectColumnsTPhmSqwxOut(tPhmSqwxLocalHistory
                .filter(col("mx").equalTo("模块过热")))
                .withColumn("cksj", expr("substring_index(id, '-', -1)")) // 从 id 字段中截取到 cksj 出库时间这个字段的值,这里是经过格式化后的数据,eg: 20230320121035
                .withColumn("mx_id", expr("substring_index(substring_index(id, '-', 4), '-', -1)")) // 获取到 mx_id 这个字段的值,也就是: 1066 这种
                .drop("id").drop("create_time"); // 这里需要将实时数据 开窗聚合的结果 添加这两个字段. id、create_time
        // 当前批次中 tcms中实时报警数据字段,选中待插入到 t_phm_sqwx 这个表中的关键字段
        //s_train_id,cx,lj,ljjc,ljm,psd,psdjc,psddm,ssxt,xtpjm,ssbj,bjpjm,bjwz,bjxlh,bjdjm,xfzt,htzt,hkzt,status,czjy,mx,mxmc,mxms,dllx,rc,yyzl,sccj,zzrq,ljzx,gzm,gzly,zdlb,yfyy,hkzbjy,hkjxjy,cksj,mx_id
        Dataset<Row> tcmsRealDataSqwxDS = selectColumnsTPhmSqwxIn(tcmsRealDataDS).select("s_train_id", "cx", "lj", "ljjc", "ljm", "psd", "psdjc", "psddm", "ssxt", "xtpjm", "ssbj", "bjpjm", "bjwz", "bjxlh", "bjdjm", "xfzt", "htzt", "hkzt", "status", "czjy", "mx", "mxmc", "mxms", "dllx", "rc", "yyzl", "sccj", "zzrq", "ljzx", "gzm", "gzly", "zdlb", "yfyy", "hkzbjy", "hkjxjy", "cksj", "mx_id");
        /*
            处理后的 视情维修结果 添加如下字段,再灌入到 `t_phm_sqwx` 这个表中
                .withColumn("id", concat_ws("-", col("s_train_id"), col("mx_id"), col("cksj")))
                .withColumn("create_time", current_timestamp())
                .withColumn("fssj", current_timestamp());
         */

        // 拉取到 ads_phm_fault 表中的当前趟中所有的报警数据.
        Dataset<Row> sqwxFinalDS = adsPhmFaultLocalHistoryDS.union(finalInsertAdsPhmFaultDS)
                .withColumn("mxmc", when(size(split(col("phm_gzmc"), ",")).geq(2), lit("所有模块均过热")) // 当 element_nums 大于等于 2 时 "所有模块均过热"
                        .otherwise(regexp_replace(concat_ws("", col("phm_gzmc")), "变流器[1-2]", ""))
                )
                .select("s_train_id", "mx_id", "s_fault_bw_code2", "mxjg", "phm_gzmc", "mxmc")
                .groupBy("s_train_id", "mx_id", "s_fault_bw_code2", "mxjg")
                .agg(
                        concat_ws(",", collect_set(col("mxmc"))).as("mxmc"),
                        concat_ws(",", collect_set(col("phm_gzmc"))).as("phm_gzmc")
                )
                .selectExpr("mx_id", "s_fault_bw_code2", "mxjg", "distinctString(phm_gzmc) as phm_gzmc", "distinctString(mxmc) as mxmc");
        Dataset<Row> sqwxBaseInfo = localHistorySqwxDS.union(tcmsRealDataSqwxDS).drop(col("mxmc")).drop(col("mxms"))
                .dropDuplicates("s_train_id", "cksj", "mx_id", "cx", "lj", "ljjc", "ljm", "psd", "psdjc", "psddm", "ssxt", "xtpjm", "ssbj", "bjpjm", "bjwz", "bjxlh", "bjdjm", "xfzt", "htzt", "hkzt", "czjy", "status", "dllx", "rc", "yyzl", "sccj", "zzrq", "ljzx", "gzm", "gzly", "zdlb", "yfyy", "hkzbjy", "hkjxjy");
        Dataset<Row> sqwxInsertFinalDs = sqwxBaseInfo.alias("t1")
                .join(sqwxFinalDS.alias("t2"),
                        expr("t2.mx_id = concat_ws('-', t1.s_train_id, t1.bjwz, t1.mx_id, t1.cksj) and t1.bjpjm = t2.s_fault_bw_code2"), "inner")
                .withColumnRenamed("phm_gzmc", "mxms")
                //.withColumn("id", concat_ws("-", col("s_train_id"), col("bjwz"), col("mx_id"), col("cksj")))
                .select(col("t2.mx_id").as("id"), col("s_train_id"), col("cx"), col("lj"), col("ljjc"), col("ljm"), col("psd"), col("psdjc"),
                        col("psddm"), col("ssxt"), col("xtpjm"), col("ssbj"), col("bjpjm"), col("bjwz"), col("bjxlh"),
                        col("bjdjm"), col("xfzt"), col("htzt"), col("hkzt"), current_timestamp().as("create_time"), col("status"),
                        col("czjy"), col("mx"), col("mxmc"), col("mxms"), col("dllx"), col("rc"), col("yyzl"), col("sccj"), col("zzrq"), col("ljzx"), col("gzm"), col("gzly"), col("zdlb"), col("yfyy"), col("hkzbjy"), col("hkjxjy"));

        // 健康评估需要的数据: ads_phm_fault 当前趟的历史数据 + 当前批次的 tcms 的 ads_phm_fault 数据 进行 union + 聚合的结果.
        Dataset<Row> tcmsAdsPhmFaultDS = finalInsertAdsPhmFaultAddMxmcDS.select(col("s_train_id"), col("s_fault_bw_code2").as("bjpjm"), col("phm_bjwz").as("bjwz"),
                split(col("mx_id"), "-").getItem(3).as("mxmc"), col("mxmc").as("xxms"));
        Dataset<Row> rowDatasetHistoryDS = adsPhmFaultLocalHistory.select(col("s_train_id"), col("s_fault_bw_code2").as("bjpjm"), col("phm_bjwz").as("bjwz"),
                split(col("mx_id"), "-").getItem(3).as("mxmc"), regexp_replace(concat_ws("", col("phm_gzmc")), "变流器[1-2]", "").as("xxms")
        ).filter(col("mxmc").equalTo("10022"));
        Dataset<Row> healthDs = null;
        if (rowDatasetHistoryDS.count() > 0) {
            healthDs = tcmsAdsPhmFaultDS.union(rowDatasetHistoryDS)
                    .groupBy("s_train_id", "bjpjm", "bjwz", "mxmc")
                    .agg(collect_set(col("xxms")).alias("phm_gzmc"));
        } else {
            healthDs = tcmsAdsPhmFaultDS
                    .groupBy("s_train_id", "bjpjm", "bjwz", "mxmc")
                    .agg(collect_set(col("xxms")).alias("phm_gzmc"));
        }
        // TODO 这里的逻辑后续可能还会改,改的地方在于: 如果当前车型、车号、位置、没有报 所有模块均过热 ,但是在多个10秒内出现了 : 第一重模块过热 + 第二重模块过热 + 第三重模块过热 +  辅逆2模块过热 中至少两个,该怎么评判呢 ?
        // 返回模块过热的健康评估结果: 评估规则: 当 phm_gzmc 长度 >= 2 或者 phm_gzmc 这个数组中包含:所有模块均过热 则评估为 C,否则评估为 B.
        Dataset<Row> healthDsFinalDs = healthDs
                .withColumn("pgjg", when(size(col("phm_gzmc")).geq(2).or(array_contains(col("phm_gzmc"), "所有模块均过热")), "C").otherwise("B"))
                .withColumn("zxx", lit(""))
                .withColumn("jgms", concat_ws(",", col("phm_gzmc"))).select("s_train_id", "bjpjm", "bjwz", "mxmc", "pgjg", "zxx", "jgms");
        return new DatasetContainer(finalInsertAdsPhmFaultDS, selectColumnsTPhmSqwxOut(sqwxInsertFinalDs), healthDsFinalDs);
    }

    /***
     * 处理HXD1D 模型二十三:牵引变流器柜体温度高报警故障视情维修模型 的事情维修和健康评估功能. 故障详情入 `ads_phm_fault`表 健康评估结果入 `t_phm_sqwx`表中,最终的健康评估需要 union返回.
     * @param spark
     * @param inputData jsonRddToDataset方法处理的结果
     * @param tPhmSqwxLocalHistory `t_phm_sqwx`当前趟中的历史数据
     * @param adsPhmFaultLocalHistory `ads_phm_fault` 当前趟中的历史数据.
     * @return
     * @throws IOException
     */
    public static DatasetContainer processFaultType23(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx1Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10023", "柜体温度高报警故障");
        Dataset<Row> rowDataset = selectColumnsReturnHealthAssessment(mx1Res.getDataset3()
                .withColumn("pgjg", when(size(split(col("phm_gzmc"), ",")).geq(1), "C"))
                .withColumn("zxx", lit(""))
                .withColumnRenamed("phm_gzmc", "jgms"));
        return new DatasetContainer(mx1Res.getDataset1(), mx1Res.getDataset2(), rowDataset);
    }

    /***
     * 处理HXD1D 模型二十四:牵引变流器柜体温度传感器故障视情维修模型 的事情维修和健康评估功能. 故障详情入 `ads_phm_fault`表 健康评估结果入 `t_phm_sqwx`表中,最终的健康评估需要 union返回.
     * @param spark
     * @param inputData jsonRddToDataset方法处理的结果
     * @param tPhmSqwxLocalHistory `t_phm_sqwx`当前趟中的历史数据
     * @param adsPhmFaultLocalHistory `ads_phm_fault` 当前趟中的历史数据.
     * @return
     * @throws IOException
     */
    public static DatasetContainer processFaultType24(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx1Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10024", "柜体温度传感器故障");
        Dataset<Row> rowDataset = selectColumnsReturnHealthAssessment(mx1Res.getDataset3()
                .withColumn("pgjg", when(size(split(col("phm_gzmc"), ",")).geq("1"), "C"))
                .withColumn("zxx", lit(""))
                .withColumnRenamed("phm_gzmc", "jgms"));
        return new DatasetContainer(mx1Res.getDataset1(), mx1Res.getDataset2(), rowDataset);
    }

    /***
     * 处理HXD1D 模型二十五:牵引变流器进水口水温高报警故障视情维修模型 的事情维修和健康评估功能. 故障详情入 `ads_phm_fault`表 健康评估结果入 `t_phm_sqwx`表中,最终的健康评估需要 union返回.
     * @param spark
     * @param inputData jsonRddToDataset方法处理的结果
     * @param tPhmSqwxLocalHistory `t_phm_sqwx`当前趟中的历史数据
     * @param adsPhmFaultLocalHistory `ads_phm_fault` 当前趟中的历史数据.
     * @return
     * @throws IOException
     */
    public static DatasetContainer processFaultType25(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx1Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10025", "进水口水温高报警故障");
        Dataset<Row> rowDataset = selectColumnsReturnHealthAssessment(mx1Res.getDataset3()
                .withColumn("pgjg", when(size(split(col("phm_gzmc"), ",")).geq("1"), "C"))
                .withColumn("zxx", lit(""))
                .withColumnRenamed("phm_gzmc", "jgms"));
        return new DatasetContainer(mx1Res.getDataset1(), mx1Res.getDataset2(), rowDataset);
    }

    /***
     * 处理HXD1D 模型二十六:牵引变流器进水口水温低报警故障视情维修模型 的事情维修和健康评估功能. 故障详情入 `ads_phm_fault`表 健康评估结果入 `t_phm_sqwx`表中,最终的健康评估需要 union返回.
     * @param spark
     * @param inputData jsonRddToDataset方法处理的结果
     * @param tPhmSqwxLocalHistory `t_phm_sqwx`当前趟中的历史数据
     * @param adsPhmFaultLocalHistory `ads_phm_fault` 当前趟中的历史数据.
     * @return
     * @throws IOException
     */
    public static DatasetContainer processFaultType26(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx1Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10026", "进水口水温低报警故障");
        Dataset<Row> rowDataset = selectColumnsReturnHealthAssessment(mx1Res.getDataset3()
                .withColumn("pgjg", when(size(split(col("phm_gzmc"), ",")).geq("1"), "C"))
                .withColumn("zxx", lit(""))
                .withColumnRenamed("phm_gzmc", "jgms"));
        return new DatasetContainer(mx1Res.getDataset1(), mx1Res.getDataset2(), rowDataset);
    }

    /***
     * 处理HXD1D 模型二十七:牵引变流器水温差报警故障故障视情维修模型 的事情维修和健康评估功能. 故障详情入 `ads_phm_fault`表 健康评估结果入 `t_phm_sqwx`表中,最终的健康评估需要 union返回.
     * @param spark
     * @param inputData jsonRddToDataset方法处理的结果
     * @param tPhmSqwxLocalHistory `t_phm_sqwx`当前趟中的历史数据
     * @param adsPhmFaultLocalHistory `ads_phm_fault` 当前趟中的历史数据.
     * @return
     * @throws IOException
     */
    public static DatasetContainer processFaultType27(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx1Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10027", "水温差报警故障");
        Dataset<Row> rowDataset = selectColumnsReturnHealthAssessment(mx1Res.getDataset3()
                .withColumn("pgjg", when(size(split(col("phm_gzmc"), ",")).geq("1"), "C"))
                .withColumn("zxx", lit(""))
                .withColumnRenamed("phm_gzmc", "jgms"));
        return new DatasetContainer(mx1Res.getDataset1(), mx1Res.getDataset2(), rowDataset);
    }

    /***
     * 处理HXD1D 模型二十八:牵引变流器水温传感器故障视情维修模型 的事情维修和健康评估功能. 故障详情入 `ads_phm_fault`表 健康评估结果入 `t_phm_sqwx`表中,最终的健康评估需要 union返回.
     * @param spark
     * @param inputData jsonRddToDataset方法处理的结果
     * @param tPhmSqwxLocalHistory `t_phm_sqwx`当前趟中的历史数据
     * @param adsPhmFaultLocalHistory `ads_phm_fault` 当前趟中的历史数据.
     * @return
     * @throws IOException
     */
    public static DatasetContainer processFaultType28(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx1Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10028", "水温传感器故障");
        Dataset<Row> rowDataset = selectColumnsReturnHealthAssessment(mx1Res.getDataset3()
                .withColumn("pgjg", when(size(split(col("phm_gzmc"), ",")).geq("1"), "C"))
                .withColumn("zxx", lit(""))
                .withColumnRenamed("phm_gzmc", "jgms"));
        return new DatasetContainer(mx1Res.getDataset1(), mx1Res.getDataset2(), rowDataset);
    }

    /***
     * 处理HXD1D 模型二十九:牵引变流器水压差报警故障视情维修模型 的事情维修和健康评估功能. 故障详情入 `ads_phm_fault`表 健康评估结果入 `t_phm_sqwx`表中,最终的健康评估需要 union返回.
     * @param spark
     * @param inputData jsonRddToDataset方法处理的结果
     * @param tPhmSqwxLocalHistory `t_phm_sqwx`当前趟中的历史数据
     * @param adsPhmFaultLocalHistory `ads_phm_fault` 当前趟中的历史数据.
     * @return
     * @throws IOException
     */
    public static DatasetContainer processFaultType29(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx1Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10029", "水压差报警故障");
        Dataset<Row> rowDataset = selectColumnsReturnHealthAssessment(mx1Res.getDataset3()
                .withColumn("pgjg", when(size(split(col("phm_gzmc"), ",")).geq("1"), "C"))
                .withColumn("zxx", lit(""))
                .withColumnRenamed("phm_gzmc", "jgms"));
        return new DatasetContainer(mx1Res.getDataset1(), mx1Res.getDataset2(), rowDataset);
    }

    /***
     * 处理HXD1D 模型三十:牵引变流器水压传感器故障视情维修模型 的事情维修和健康评估功能. 故障详情入 `ads_phm_fault`表 健康评估结果入 `t_phm_sqwx`表中,最终的健康评估需要 union返回.
     * @param spark
     * @param inputData jsonRddToDataset方法处理的结果
     * @param tPhmSqwxLocalHistory `t_phm_sqwx`当前趟中的历史数据
     * @param adsPhmFaultLocalHistory `ads_phm_fault` 当前趟中的历史数据.
     * @return
     * @throws IOException
     */
    public static DatasetContainer processFaultType30(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory) throws IOException {
        DatasetContainer mx1Res = processFaultCommon(spark, inputData, tPhmSqwxLocalHistory, adsPhmFaultLocalHistory, "10030", "水压传感器故障");
        Dataset<Row> rowDataset = selectColumnsReturnHealthAssessment(mx1Res.getDataset3()
                .withColumn("pgjg", when(size(split(col("phm_gzmc"), ",")).geq("1"), "C"))
                .withColumn("zxx", lit(""))
                .withColumnRenamed("phm_gzmc", "jgms"));
        return new DatasetContainer(mx1Res.getDataset1(), mx1Res.getDataset2(), rowDataset);
    }

    /***
     *
     * @param spark
     * @param inputData 当前tcms的实时数据 left join 模型详情表的最终结果.也就是当前的DataSet中包含当前批次的所有故障数据.每个方法只需要处理自己的部分就好.
     * @param tPhmSqwxLocalHistory 读取 mysql  `t_phm_sqwx` 视情维修表中的当前趟中的历史数据.
     * @param adsPhmFaultLocalHistory 读取 mysql  `ads_phm_fault` 故障详情表中的当前趟中的历史数据.
     */
    public static DatasetContainer processFaultCommon(SparkSession spark, Dataset<TcmsRealDataJoinMxxq> inputData, Dataset<Row> tPhmSqwxLocalHistory, Dataset<Row> adsPhmFaultLocalHistory, String mx_id, String mxmc) throws IOException {
        Dataset<TcmsRealDataJoinMxxq> tcmsRealDataJoinMxxqDataset = inputData.filter((FilterFunction<TcmsRealDataJoinMxxq>) tcmsRealDataJoinMxxq -> tcmsRealDataJoinMxxq.getMX_ID().equals(mx_id));
        //System.out.println("========== 当前模型中所有的实时数据..........");
        //tcmsRealDataJoinMxxqDataset.show(false);
        // `t_phm_sqwx` 表中当前趟中指定的 模型名称 待处理历史数据 ......
        Dataset<Row> localHistorySqwxDS = selectColumnsTPhmSqwxOut(tPhmSqwxLocalHistory
                .filter(col("mx").equalTo(mxmc)))
                .withColumn("cksj", expr("substring_index(id, '-', -1)"))
                .withColumn("mx_id", expr("substring_index(substring_index(id, '-', 4), '-', -1)"))
                .drop("id").drop("create_time")
                .select("s_train_id", "cx", "lj", "ljjc", "ljm", "psd", "psdjc", "psddm", "ssxt", "xtpjm", "ssbj", "bjpjm", "bjwz", "bjxlh", "bjdjm", "xfzt", "htzt", "hkzt", "status", "czjy", "mx", "mxmc", "mxms", "cksj", "mx_id", "dllx", "rc", "yyzl", "sccj", "zzrq", "ljzx", "gzm", "gzly", "zdlb", "yfyy", "hkzbjy", "hkjxjy");
        // ======================================================================================== 入 ads_phm_fault 逻辑 =================================================
        // 对于单一故障,没有组合关系的报警信息,来一条就可以入一条数据到 `ads_phm_fault`中.
        //System.out.println("入 ads_phm_fault 表中的数据..........");
        Dataset<Row> adsPhmFault = selectColumnsAdsPhmFault(tcmsRealDataJoinMxxqDataset);
        //MysqlUtils_2.writeDataToMysqlTable(adsPhmFault, "ads_phm_fault", SaveMode.Append);
        // ======================================================================================== 入 ads_phm_fault 完成 =================================================

        // 入 t_phm_sqwx 表中的逻辑: 当前tcms实时数据 + 当前躺中 t_phm_sqwx 表中的历史数据,聚合操作,并最终更新写入到 t_phm_sqwx.聚合的粒度:每个车型、车号、位置、模型、每趟 聚合成一列.
        // TODO 2023-04-07: 这里需要将 CZJY、GZM、HKZBJY、HKJXJY 这几个字段也要聚合成一行.
        Dataset<Row> tcmsRealSqwxInsertDS = selectColumnsTPhmSqwxIn(tcmsRealDataJoinMxxqDataset);
        Dataset<Row> sqwxInsertFinalDS = null;
        if (localHistorySqwxDS.count() > 0) {
            // 如果当前批次拉取到的当前趟的数据集不是空的,则需要将视情维修历史 + tcms 实时数据 union,再聚合
            sqwxInsertFinalDS = localHistorySqwxDS.union(tcmsRealSqwxInsertDS)
                    .groupBy("s_train_id", "cx", "lj", "ljjc", "ljm", "psd", "psdjc", "psddm", "ssxt", "xtpjm", "ssbj", "bjpjm", "bjwz", "bjxlh", "bjdjm", "xfzt", "htzt", "hkzt", "status", "mx", "cksj", "mx_id", "dllx", "rc", "yyzl", "sccj", "zzrq", "ljzx", "gzly", "zdlb", "yfyy")
                    .agg(
                            concat_ws(",", collect_set(col("mxmc"))).alias("mxmc"),
                            concat_ws(",", collect_set(col("mxms"))).alias("mxms"),
                            concat_ws(",", collect_set(col("czjy"))).alias("czjy"),
                            concat_ws(",", collect_set(col("gzm"))).alias("gzm"),
                            concat_ws(",", collect_set(col("hkzbjy"))).alias("hkzbjy"),
                            concat_ws(",", collect_set(col("hkjxjy"))).alias("hkjxjy")
                    )
                    .withColumn("id", concat_ws("-", col("s_train_id"), col("bjwz"), col("mx_id"), col("cksj")))
                    .withColumn("create_time", current_timestamp());
            //.withColumn("fssj", current_timestamp());
        } else {
            sqwxInsertFinalDS = tcmsRealSqwxInsertDS
                    .groupBy("s_train_id", "cx", "lj", "ljjc", "ljm", "psd", "psdjc", "psddm", "ssxt", "xtpjm", "ssbj", "bjpjm", "bjwz", "bjxlh", "bjdjm", "xfzt", "htzt", "hkzt", "status", "mx", "cksj", "mx_id", "dllx", "rc", "yyzl", "sccj", "zzrq", "ljzx", "gzly", "zdlb", "yfyy")
                    .agg(
                            concat_ws(",", collect_set(col("mxmc"))).alias("mxmc"),
                            concat_ws(",", collect_set(col("mxms"))).alias("mxms"),
                            concat_ws(",", collect_set(col("czjy"))).alias("czjy"),
                            concat_ws(",", collect_set(col("gzm"))).alias("gzm"),
                            concat_ws(",", collect_set(col("hkzbjy"))).alias("hkzbjy"),
                            concat_ws(",", collect_set(col("hkjxjy"))).alias("hkjxjy")
                    )
                    .withColumn("id", concat_ws("-", col("s_train_id"), col("bjwz"), col("mx_id"), col("cksj")))
                    .withColumn("create_time", current_timestamp());
            //.withColumn("fssj", current_timestamp());
        }
        // 这里需要将 mxmc和mxms字段按照逗号分隔后,每个字串进行去重操作.
        Dataset<Row> rowDataset = sqwxInsertFinalDS.withColumn("mxmc", expr("distinctString(mxmc)"))
                .withColumn("mxms", expr("distinctString(mxms)"));
        //MysqlUtils_2.upsertDatasetToMySQL(selectColumnsTPhmSqwxOut(sqwxInsertFinalDS), "t_phm_sqwx");

        // 健康评估需要的数据: ads_phm_fault 当前趟的历史数据 + 当前批次的 tcms 的 ads_phm_fault 数据 进行 union + 聚合的结果.
        Dataset<Row> tcmsAdsPhmFaultDS = tcmsRealDataJoinMxxqDataset.select(col("s_train_id"), col("bjpjm"), col("phm_bjwz").as("bjwz"),
                col("mx_id").as("mxmc"), col("xxms"));
        Dataset<Row> rowDatasetHistoryDS = adsPhmFaultLocalHistory.select(col("s_train_id"), col("S_FAULT_BW_CODE2").as("bjpjm"), col("phm_bjwz").as("bjwz"),
                split(col("mx_id"), "-").getItem(3).as("mxmc"), col("phm_gzmc").as("xxms")).filter(col("mxmc").equalTo(mx_id));
        Dataset<Row> healthDs = null;
        if (rowDatasetHistoryDS.count() > 0) {
            healthDs = tcmsAdsPhmFaultDS.union(rowDatasetHistoryDS)
                    .groupBy("s_train_id", "bjpjm", "bjwz", "mxmc")
                    .agg(concat_ws(",", collect_set(col("xxms"))).alias("phm_gzmc"));
        } else {
            healthDs = tcmsAdsPhmFaultDS
                    .groupBy("s_train_id", "bjpjm", "bjwz", "mxmc")
                    .agg(concat_ws(",", collect_set(col("xxms"))).alias("phm_gzmc"));
        }
        //healthDs.show(false);
        // Done 这里给每个模型返回的健康评估结果,需要加一个过滤条件,从而返回给每个模型的健康评估结果是正确的.
        return new DatasetContainer(adsPhmFault, selectColumnsTPhmSqwxOut(rowDataset), healthDs);
    }

    public static Dataset<Row> selectColumnsAdsPhmFault(Dataset<TcmsRealDataJoinMxxq> inputDS) {
        return inputDS.select(col("s_train_id"), col("idx").as("s_fault_id"), concat_ws("-", col("s_train_id"), col("phm_bjwz"), col("mx_id"), date_format(col("cksj"), "yyyyMMddHHmmss")).as("mx_id"), col("s_train_id").as("s_train_name"),
                col("cx").as("s_train_type_code"), col("source").as("s_fault_source"), col("gzkssj_up").as("s_fault_time"), col("ssxt").as("s_fault_sys"),
                col("xtbm").as("s_fault_sys_code1"), col("xtpjm").as("s_fault_sys_code2"), col("ssbj").as("s_fault_bw"), col("bjbm").as("s_fault_bw_code1"),
                col("bjpjm").as("s_fault_bw_code2"), col("gzdm_wm").as("s_fault_code"), col("gzmc").as("s_fault_name"), col("phm_lb"), col("mxjg"), col("phm_mc").as("phm_gzmc"),
                col("phm_bjwz"), col("zj_ms"), col("zj_fa"), col("pjxlh"), col("pjdjm"), lit("0").as("s_htzt"), lit("0").as("s_hkzt"), lit("0").as("s_xfzt"));
    }

    /***
     * 拉取 `ads_phm_fault`表中当前趟的历史数据,选取字段.
     * @param inputDS
     * @return
     */
    public static Dataset<Row> selectColumnsAdsPhmFaultReadHistory(Dataset<Row> inputDS) {
        return inputDS.select(col("s_train_id"), col("s_fault_id"), split(col("mx_id"), "-").getItem(3).as("mx_id"), split(col("mx_id"), "-").getItem(4).as("cksj"),
                col("s_train_name"), col("s_train_type_code"), col("s_fault_source"), col("s_fault_time"), col("s_fault_sys"),
                col("s_fault_sys_code1"), col("s_fault_sys_code2"), col("s_fault_bw"), col("s_fault_bw_code1"),
                col("s_fault_bw_code2"), col("s_fault_code"), col("s_fault_name"), col("phm_lb"), col("mxjg"), col("phm_gzmc"),
                col("phm_bjwz"), col("zj_ms"), col("zj_fa"), col("pjxlh"), col("pjdjm"), col("s_htzt"), col("s_hkzt"), col("s_xfzt"));
    }

    public static Dataset<Row> selectColumnsAdsPhmFaultYjgz(Dataset<Row> inputDS) {
        return inputDS.select(col("s_train_id"), col("idx").as("s_fault_id"), concat_ws("-", col("s_train_id"), col("phm_bjwz"), col("mx_id"), date_format(col("cksj"), "yyyyMMddHHmmss")).as("mx_id"), col("s_train_id").as("s_train_name"),
                col("cx").as("s_train_type_code"), col("source").as("s_fault_source"), col("gzkssj_up").as("s_fault_time"), col("ssxt").as("s_fault_sys"),
                col("xtbm").as("s_fault_sys_code1"), col("xtpjm").as("s_fault_sys_code2"), col("ssbj").as("s_fault_bw"), col("bjbm").as("s_fault_bw_code1"),
                col("bjpjm").as("s_fault_bw_code2"), col("gzdm_wm").as("s_fault_code"), col("gzmc").as("s_fault_name"), col("phm_lb"), col("mxjg"), col("phm_mc").as("phm_gzmc"),
                col("phm_bjwz"), col("zj_ms"), col("zj_fa"), col("pjxlh"), col("pjdjm"), lit("0").as("s_htzt"), lit("0").as("s_hkzt"), lit("0").as("s_xfzt"));
    }

    /***
     * 从 tcms 实时数据 + 模型详情 join的宽表中 拉取 `t_phm_sqwx` 表中需要聚合的字段.
     * @param inputDS
     * @return
     */
    public static Dataset<Row> selectColumnsTPhmSqwxIn(Dataset<TcmsRealDataJoinMxxq> inputDS) {
        return inputDS.select(col("s_train_id"), col("cx"), col("lj"), col("ljjc"), col("lj_id").as("ljm"), col("psd"), col("psdjc"),
                col("psd_id").as("psddm"), col("ssxt"), col("xtpjm"), col("ssbj"), col("bjpjm"), col("phm_bjwz").as("bjwz"), col("pjxlh").as("bjxlh"),
                col("pjdjm").as("bjdjm"), lit("0").as("xfzt"), lit("0").as("htzt"), lit("0").as("hkzt"), lit("1").as("status"),
                col("czjy"), col("mxjg").as("mx"), col("jgms").as("mxmc"), col("xxms").as("mxms"), date_format(col("cksj"), "yyyyMMddHHmmss").as("cksj"), col("mx_id"),
                col("jcdllxmc").as("dllx"), col("rc"), lit("-").as("yyzl"), col("zzc").as("sccj"), col("zzrq"), col("ljzxgl").as("ljzx"), lit("-").as("gzm"), lit("TCMS").as("gzly"), lit("-").as("zdlb"), lit("-").as("yfyy"), col("zbjy").as("hkzbjy"), col("JXJY").as("hkjxjy"));
    }

    /***
     * 从指定的 DataSet 中拉取到 入 `t_phm_sqwx`表中的字段
     * @param writeDs
     * @return
     */
    public static Dataset<Row> selectColumnsTPhmSqwxOut(Dataset<Row> writeDs) {
        return writeDs.select(col("id"), col("s_train_id"), col("cx"), col("lj"), col("ljjc"), col("ljm"), col("psd"), col("psdjc"),
                col("psddm"), col("ssxt"), col("xtpjm"), col("ssbj"), col("bjpjm"), col("bjwz"), col("bjxlh"),
                col("bjdjm"), col("xfzt"), col("htzt"), col("hkzt"), col("create_time"), col("status"),
                col("czjy"), col("mx"), col("mxmc"), col("mxms"), col("dllx"), col("rc"), col("yyzl"), col("sccj"), col("zzrq"), col("ljzx"), col("gzm"), col("gzly"), col("zdlb"), col("yfyy"), col("hkzbjy"), col("hkjxjy"));
    }

    public static Dataset<Row> selectColumnsReturnHealthAssessment(Dataset<Row> healthAssessmentResDS) {
        return healthAssessmentResDS.select("s_train_id", "bjpjm", "bjwz", "mxmc", "pgjg", "zxx", "jgms");
    }

    /***
     * 传入当前批次中 tcms实时报警数据: JavaRDD<String> jsonRDD ,返回一个 DataSet<TcmsRealData> 的数据集.
     * @param spark
     * @param jsonRDD
     * @return 当前数据集中包含了 `ads_phm_fault`和 `t_phm_sqwx` 表中所有的字段.
     */
    public static Dataset<TcmsRealDataJoinMxxq> jsonRddToDataset(SparkSession spark, JavaRDD<String> jsonRDD) throws IOException {
        Dataset<Row> jsonData = spark.read().json(jsonRDD);
        // 将 Dataset<Row> 转换为 Dataset<tcmsRealData>,里面存放的是 `tcms` 实时数据.
        Dataset<TcmsRealData> tcmsRealDataDS = jsonData.as(Encoders.bean(TcmsRealData.class));
        // 这里进行数据过滤:只要 cx = `HXD1D` 并且 phm_lb != '-'
        Dataset<TcmsRealData> hxd1DTcmsRealDataDS = tcmsRealDataDS.filter(
                (FilterFunction<TcmsRealData>) tcmsRealData -> tcmsRealData.getCx().equals("HXD1D") && !tcmsRealData.getPhm_lb().equals("-")
        );
        //读取 模型详情`t_phm_mxxq`字典,拉去模型相关的字段. 这里两张表进行关联.
        Dataset<PhmMxxq> mxxqDS = MysqlUtils_2.readMysqlTableDs(spark, "t_phm_mxxq").select(col("MX_ID"), col("SYJX"), col("MXMC"), col("MXJG"), col("JGMS"), col("XXMS"), col("CZJY"), col("ZBJY"), col("JXJY")).as(Encoders.bean(PhmMxxq.class));
        Dataset<TcmsRealDataJoinMxxq> joinAfterDs = hxd1DTcmsRealDataDS.alias("t1").join(mxxqDS.alias("t2"), expr("t1.phm_mc = t2.xxms"), "left").as(Encoders.bean(TcmsRealDataJoinMxxq.class));
        Dataset<Row> rowDataset = joinAfterDs.withColumn("czjy", when(col("phm_lb").equalTo("变流器元件故障报警"), "检查或更换对应模块的脉冲/驱动板、IGBT").otherwise(col("czjy")))
                .withColumn("mx_id", when(col("phm_lb").equalTo("变流器元件故障报警"), "10003").otherwise(col("mx_id")))
                .withColumn("mxjg", when(col("phm_lb").equalTo("变流器元件故障报警"), "元件故障").otherwise(col("mxjg")))
                .withColumn("syjx", when(col("phm_lb").equalTo("变流器元件故障报警"), "HXD1D").otherwise(col("syjx")))
                .withColumn("mxmc", when(col("phm_lb").equalTo("变流器元件故障报警"), "牵引变流器元件故障视情维修模型").otherwise(col("mxmc")))
                .withColumn("xxms", when(col("phm_lb").equalTo("变流器元件故障报警"), col("phm_mc")).otherwise(col("xxms")));
        return rowDataset.as(Encoders.bean(TcmsRealDataJoinMxxq.class));
    }

    /***
     * 定义一个方法,将传入的 DataSet 进行 union操作.如果当前数据集中没有数据,则不参与 union.
     * @param datasets
     * @return
     */
    public static Dataset<Row> unionWithNonEmptyDatasets(Dataset<Row>... datasets) {
        Dataset<Row> result = null;
        for (Dataset<Row> ds : datasets) {
            if (ds != null && ds.takeAsList(1).isEmpty() == false) {
                if (result == null) {
                    result = ds;
                } else {
                    result = result.union(ds);
                }
            }
        }
        return result;
    }
}